Function at 0x404db0
Capabilities:
Terminate process

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
push esi
mov esi, dword [esp + 0x14]
push edi
test esi, esi
je 0x404e52
push 0x14
call fcn.0040d568
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x404dee
push str.Out_of_memory__n
push 0x41dd28
call fcn.0040e254
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
ret
mov eax, dword [esp + 0x1c]
push eax
call fcn.0040d568
add esp, 4
mov dword [ebp], eax
test eax, eax
jne 0x404e13
push ebp
call fcn.0040d5dc
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
ret
mov edx, dword [esp + 0x1c]
mov edi, eax
mov ecx, edx
mov dword [ebp + 4], edx
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebp + 0xc], eax
mov ecx, dword [ebx]
mov dword [ebp + 0x10], ecx
mov dword [ebp + 8], eax
cmp dword [ebx + 4], eax
jne 0x404e43
mov dword [ebx + 4], ebp
jmp 0x404e48
mov eax, dword [ebx]
mov dword [eax + 0xc], ebp
mov eax, dword [ebx + 0x24]
mov dword [ebx], ebp
add eax, edx
mov dword [ebx + 0x24], eax
mov eax, dword [ebx + 0x10]
test eax, eax
jne 0x40523f
cmp dword [ebx + 0x34], 0xffffffff
je 0x404e94
mov eax, dword [ebx + 0x7c9c]
test eax, eax
jne 0x404e94
push 1
push ebx
call fcn.00404c70
add esp, 8
mov dword [esp + 0x1c], eax
xor ebp, ebp
mov edx, dword [esp + 0x1c]
cmp edx, ebp
jge 0x404f81
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
ret
xor ebp, ebp
push ebp
push ebx
mov dword [ebx + 0x7c9c], ebp
call fcn.00404c70
mov esi, eax
mov eax, dword [ebx + 0x24]
add esp, 8
mov dword [esp + 0x1c], esi
lea ecx, [esi + 0x30]
cmp eax, ecx
jl 0x4053c4
push esi
push ebx
call fcn.00404bc0
mov ecx, dword [ebx + 8]
add esp, 8
cmp ecx, ebp
je 0x404e7e
lea ecx, [eax + esi]
mov eax, dword [ebx + 0x24]
cmp ecx, eax
mov dword [esp + 0x1c], ecx
jle 0x404ee3
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
ret
xor edi, edi
cmp ecx, ebp
jle 0x4053c4
mov esi, dword [ebx + 4]
mov edx, dword [esi + 8]
mov eax, dword [esi + 4]
cmp edx, eax
jl 0x404f34
mov eax, dword [esi + 0xc]
cmp eax, ebp
mov dword [ebx + 4], eax
je 0x404f09
mov dword [eax + 0x10], ebp
jmp 0x404f0e
mov dword [ebx], ebp
mov dword [ebx + 4], ebp
mov eax, dword [esi]
push eax
call fcn.0040d5dc
push esi
call fcn.0040d5dc
mov esi, dword [ebx + 4]
add esp, 8
cmp esi, ebp
je 0x404f54
mov ecx, dword [esi + 8]
mov eax, dword [esi + 4]
cmp ecx, eax
jge 0x404efa
mov ecx, dword [esp + 0x1c]
mov eax, dword [ebx + 0x24]
dec eax
mov dword [ebx + 0x24], eax
mov eax, dword [ebx + 4]
mov esi, dword [eax + 8]
inc esi
inc edi
cmp edi, ecx
mov dword [eax + 8], esi
jl 0x404eed
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
ret
push str.Fatal_error__tried_to_read_past_mp_buffer_n
push 0x41dd28
call fcn.0040e254
push 0x41dd08
call fcn.0040de15
push 0x41dd28
call fcn.0040de15
add esp, 0x10
push 1
call fcn.0040e17f
jle 0x40510d
mov eax, dword [ebx + 0x5a94]
mov dword [ebx + 0x20], ebp
mov dword [ebx + 0x7c9c], 1
lea ecx, [eax + eax*8]
mov eax, dword [0x804f2c]
shl ecx, 8
sub eax, ecx
sub eax, ebx
sub eax, 0x284
cmp eax, 0x700
jle 0x404fc4
lea ecx, [ecx + ebx + 0x284]
xor eax, eax
mov dword [0x804f2c], ecx
lea edi, [eax + edx - 0x700]
cmp edi, ebp
jle 0x405035
mov esi, dword [ebx + 4]
mov ecx, dword [esp + 0x1c]
dec ecx
mov edx, dword [esi + 8]
mov eax, dword [esi + 4]
cmp edx, eax
mov dword [esp + 0x1c], ecx
jl 0x40501f
mov eax, dword [esi + 0xc]
cmp eax, ebp
mov dword [ebx + 4], eax
je 0x404ff4
mov dword [eax + 0x10], ebp
jmp 0x404ff9
mov dword [ebx], ebp
mov dword [ebx + 4], ebp
mov eax, dword [esi]
push eax
call fcn.0040d5dc
push esi
call fcn.0040d5dc
mov esi, dword [ebx + 4]
add esp, 8
cmp esi, ebp
je 0x4050b2
mov ecx, dword [esi + 8]
mov eax, dword [esi + 4]
cmp ecx, eax
jge 0x404fe5
mov esi, dword [ebx + 0x24]
mov eax, dword [ebx + 4]
dec esi
mov dword [ebx + 0x24], esi
mov edx, dword [eax + 8]
inc edx
dec edi
cmp edi, ebp
mov dword [eax + 8], edx
jg 0x404fcf
mov eax, dword [esp + 0x1c]
mov edx, dword [0x804f2c]
xor ebp, ebp
mov dword [esp + 0x18], edx
test eax, eax
jle 0x4050ff
mov edx, dword [ebx + 4]
mov ecx, dword [esp + 0x1c]
sub ecx, ebp
mov esi, dword [edx + 8]
mov eax, dword [edx + 4]
sub eax, esi
cmp ecx, eax
jg 0x405064
mov eax, ecx
mov edi, dword [edx]
mov edx, dword [esp + 0x18]
mov ecx, eax
add esi, edi
lea edi, [edx + ebp]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
add ebp, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 4]
mov esi, dword [ecx + 8]
add esi, eax
mov dword [ecx + 8], esi
mov edx, dword [ebx + 0x24]
mov esi, dword [ebx + 4]
sub edx, eax
mov dword [ebx + 0x24], edx
mov eax, dword [esi + 8]
mov ecx, dword [esi + 4]
cmp eax, ecx
jne 0x4050f5
mov eax, dword [esi + 0xc]
xor ecx, ecx
cmp eax, ecx
mov dword [ebx + 4], eax
je 0x4050df
mov dword [eax + 0x10], ecx
jmp 0x4050e4
push str.Fatal_error__tried_to_read_past_mp_buffer_n
push 0x41dd28
call fcn.0040e254
push 0x41dd08
call fcn.0040de15
push 0x41dd28
call fcn.0040de15
add esp, 0x10
push 1
call fcn.0040e17f
mov dword [ebx], ecx
mov dword [ebx + 4], ecx
mov ecx, dword [esi]
push ecx
call fcn.0040d5dc
push esi
call fcn.0040d5dc
add esp, 8
cmp ebp, dword [esp + 0x1c]
jl 0x40504d
mov edx, dword [esp + 0x1c]
mov eax, dword [ebx + 0x34]
add eax, edx
xor ebp, ebp
mov dword [ebx + 0x34], eax
mov ecx, dword [ebx + 4]
mov eax, dword [ecx + 8]
mov edx, dword [ecx + 4]
cmp eax, edx
jl 0x405138
push ebx
call fcn.004049b0
mov ecx, dword [ebx + 4]
add esp, 4
cmp ecx, ebp
je 0x4051bc
mov eax, dword [ecx + 8]
mov edx, dword [ecx + 4]
cmp eax, edx
jge 0x40511a
mov ecx, dword [ebx + 4]
push ebx
mov edx, dword [ecx]
xor ecx, ecx
mov cl, byte [edx + eax]
mov eax, dword [ebx + 0x24]
dec eax
mov edi, ecx
mov dword [ebx + 0x24], eax
mov eax, dword [ebx + 4]
inc dword [eax + 8]
call fcn.00405640
mov esi, eax
push ebx
shl edi, 8
or esi, edi
shl esi, 8
call fcn.00405640
mov edi, eax
push ebx
or edi, esi
shl edi, 8
call fcn.00405640
or eax, edi
lea esi, [ebx + 0x3c]
push eax
push esi
mov dword [ebx + 0x5a90], eax
call fcn.004027c0
mov eax, dword [ebx + 0x80]
add esp, 0x14
xor edx, edx
mov dword [ebx + 0x28], eax
cmp eax, ebp
mov eax, dword [ebx + 0x48]
sete dl
cmp eax, ebp
mov dword [ebx + 0x10], 1
mov dword [ebx + 0x1c], edx
je 0x4051e9
mov eax, dword [esi]
dec eax
neg eax
sbb eax, eax
and eax, 8
add eax, 9
mov dword [ebx + 0x2c], eax
jmp 0x4051f9
push str.Fatal_error__tried_to_read_past_mp_buffer_n
push 0x41dd28
call fcn.0040e254
push 0x41dd08
call fcn.0040de15
push 0x41dd28
call fcn.0040de15
add esp, 0x10
push 1
call fcn.0040e17f
mov ecx, dword [esi]
dec ecx
neg ecx
sbb ecx, ecx
and ecx, 0xf
add ecx, 0x11
mov dword [ebx + 0x2c], ecx
cmp dword [ebx + 0x58], ebp
je 0x405202
add dword [ebx + 0x2c], 2
mov edi, dword [ebx + 0x5a94]
mov eax, 1
sub eax, edi
mov dword [ebx + 0x5a94], eax
mov dword [0x804f30], ebp
lea edx, [eax + eax*8]
shl edx, 8
lea eax, [edx + ebx + 0x284]
mov dword [0x804f2c], eax
mov ecx, dword [ebx + 0x34]
cmp ecx, 0xffffffff
jne 0x405244
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
ret
mov eax, dword [0x804f2c]
mov ecx, dword [ebx + 0x14]
test ecx, ecx
jne 0x4053a2
cmp dword [ebx + 0x54], 3
jne 0x405375
mov ecx, dword [ebx + 0x2c]
mov edx, dword [ebx + 0x24]
cmp edx, ecx
mov dword [esp + 0x1c], ecx
jge 0x405271
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
ret
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x1c]
xor ebp, ebp
test eax, eax
jle 0x405308
mov edx, dword [ebx + 4]
mov ecx, dword [esp + 0x1c]
sub ecx, ebp
mov esi, dword [edx + 8]
mov eax, dword [edx + 4]
sub eax, esi
cmp ecx, eax
jg 0x40529a
mov eax, ecx
mov edi, dword [edx]
mov edx, dword [esp + 0x18]
mov ecx, eax
add esi, edi
lea edi, [edx + ebp]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
add ebp, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 4]
mov esi, dword [ecx + 8]
add esi, eax
mov dword [ecx + 8], esi
mov edx, dword [ebx + 0x24]
mov esi, dword [ebx + 4]
sub edx, eax
mov dword [ebx + 0x24], edx
mov eax, dword [esi + 8]
mov ecx, dword [esi + 4]
cmp eax, ecx
jne 0x4052fe
mov eax, dword [esi + 0xc]
xor ecx, ecx
cmp eax, ecx
mov dword [ebx + 4], eax
je 0x4052e8
mov dword [eax + 0x10], ecx
jmp 0x4052ed
mov dword [ebx], ecx
mov dword [ebx + 4], ecx
mov ecx, dword [esi]
push ecx
call fcn.0040d5dc
push esi
call fcn.0040d5dc
add esp, 8
cmp ebp, dword [esp + 0x1c]
jl 0x405283
mov eax, dword [ebx + 0x58]
test eax, eax
je 0x405319
push 0x10
call fcn.00402960
add esp, 4
lea edx, [ebx + 0x3c]
push edx
call fcn.00405f00
add esp, 4
cmp eax, 0xffff8001
jne 0x40535e
mov esi, dword [ebx + 4]
test esi, esi
je 0x40534d
mov eax, dword [esi]
push eax
call fcn.0040d5dc
mov edi, dword [esi + 0xc]
push esi
call fcn.0040d5dc
add esp, 8
mov esi, edi
test edi, edi
jne 0x405333
push ebx
call fcn.00404900
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
ret
test eax, eax
jge 0x405364
xor eax, eax
add eax, 7
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [ebx + 0x30], eax
jmp 0x405396
mov eax, dword [ebx + 0x80]
mov ecx, dword [ebx + 0x24]
cmp eax, ecx
jle 0x40538c
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
ret
mov dword [ebx + 0x30], eax
mov dword [ebx + 0x2c], 0
mov dword [ebx + 0x14], 1
mov eax, dword [0x804f2c]
mov ecx, dword [ebx + 0x18]
mov esi, 1
test ecx, ecx
mov dword [esp + 0x18], esi
jne 0x4054d5
mov ecx, dword [ebx + 0x30]
mov edx, dword [ebx + 0x24]
cmp ecx, edx
mov dword [esp + 0x1c], ecx
jle 0x4053ce
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
ret
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x1c]
xor ebp, ebp
test eax, eax
jle 0x405465
mov edx, dword [ebx + 4]
mov ecx, dword [esp + 0x1c]
sub ecx, ebp
mov esi, dword [edx + 8]
mov eax, dword [edx + 4]
sub eax, esi
cmp ecx, eax
jg 0x4053f7
mov eax, ecx
mov edi, dword [edx]
mov edx, dword [esp + 0x18]
mov ecx, eax
add esi, edi
lea edi, [edx + ebp]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
add ebp, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 4]
mov esi, dword [ecx + 8]
add esi, eax
mov dword [ecx + 8], esi
mov edx, dword [ebx + 0x24]
mov esi, dword [ebx + 4]
sub edx, eax
mov dword [ebx + 0x24], edx
mov eax, dword [esi + 8]
mov ecx, dword [esi + 4]
cmp eax, ecx
jne 0x40545b
mov eax, dword [esi + 0xc]
xor ecx, ecx
cmp eax, ecx
mov dword [ebx + 4], eax
je 0x405445
mov dword [eax + 0x10], ecx
jmp 0x40544a
mov dword [ebx], ecx
mov dword [ebx + 4], ecx
mov ecx, dword [esi]
push ecx
call fcn.0040d5dc
push esi
call fcn.0040d5dc
add esp, 8
cmp ebp, dword [esp + 0x1c]
jl 0x4053e0
mov ecx, dword [esp + 0x20]
xor esi, esi
mov dword [esp + 0x18], esi
mov dword [ecx], 0
mov eax, dword [ebx + 0x54]
cmp eax, 3
je 0x405492
push eax
push str.invalid_layer__d_n
push 0x41dd28
call fcn.0040e254
add esp, 0xc
jmp 0x4054a7
push ecx
push ebx
call fcn.004065c0
add esp, 8
test eax, eax
je 0x4054a7
or esi, 0xffffffff
mov dword [esp + 0x18], esi
mov eax, dword [ebx + 0x5a94]
mov ecx, dword [ebx + 0x2c]
lea edx, [eax + eax*8]
mov eax, dword [ebx + 0x30]
shl edx, 8
add edx, ecx
add edx, eax
lea eax, [edx + ebx + 0x284]
mov dword [0x804f2c], eax
mov dword [ebx + 0x18], 1
mov eax, dword [0x804f2c]
mov ecx, dword [ebx + 0x1c]
test ecx, ecx
je 0x405520
mov eax, dword [ebx + 0x20]
test eax, eax
je 0x4054f0
mov ecx, dword [ebx + 0x64]
mov eax, dword [ebx + 0x38]
add ecx, eax
mov dword [ebx + 0x28], ecx
jmp 0x40551b
push 1
push ebx
call fcn.00404c70
add esp, 8
test eax, eax
jge 0x405506
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
ret
mov edx, dword [ebx + 0x30]
mov edi, dword [ebx + 0x2c]
mov ecx, dword [ebx + 0x64]
add edx, edi
add eax, edx
mov dword [ebx + 0x28], eax
sub eax, ecx
mov dword [ebx + 0x38], eax
mov eax, dword [0x804f2c]
mov ecx, dword [ebx + 0x28]
mov ebp, dword [ebx + 0x30]
mov edi, dword [ebx + 0x2c]
mov edx, dword [ebx + 0x24]
sub ecx, ebp
sub ecx, edi
cmp ecx, edx
mov dword [esp + 0x1c], ecx
jle 0x40553f
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
ret
test ecx, ecx
jle 0x40561a
mov ecx, dword [esp + 0x1c]
xor ebp, ebp
test ecx, ecx
mov dword [esp + 0x14], eax
jle 0x4055e3
mov edx, dword [ebx + 4]
mov ecx, dword [esp + 0x1c]
sub ecx, ebp
mov esi, dword [edx + 8]
mov eax, dword [edx + 4]
sub eax, esi
cmp ecx, eax
jg 0x405570
mov eax, ecx
mov edi, dword [edx]
mov edx, dword [esp + 0x14]
mov ecx, eax
add esi, edi
lea edi, [edx + ebp]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
add ebp, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 4]
mov esi, dword [ecx + 8]
add esi, eax
mov dword [ecx + 8], esi
mov edx, dword [ebx + 0x24]
mov esi, dword [ebx + 4]
sub edx, eax
mov dword [ebx + 0x24], edx
mov eax, dword [esi + 8]
mov ecx, dword [esi + 4]
cmp eax, ecx
jne 0x4055d4
mov eax, dword [esi + 0xc]
xor ecx, ecx
cmp eax, ecx
mov dword [ebx + 4], eax
je 0x4055be
mov dword [eax + 0x10], ecx
jmp 0x4055c3
mov dword [ebx], ecx
mov dword [ebx + 4], ecx
mov ecx, dword [esi]
push ecx
call fcn.0040d5dc
push esi
call fcn.0040d5dc
add esp, 8
cmp ebp, dword [esp + 0x1c]
jl 0x405559
mov eax, dword [0x804f2c]
add eax, dword [esp + 0x1c]
mov dword [0x804f2c], eax
mov ecx, dword [ebx + 0x5a94]
lea edx, [ecx + ecx*8]
shl edx, 8
sub eax, edx
sub eax, ebx
sub eax, 0x284
cmp eax, 0x700
jle 0x40561a
push str.fatal_error.__MAXFRAMESIZE_not_large_enough._n
push 0x41dd28
call fcn.0040e254
add esp, 8
mov eax, dword [ebx + 0x28]
mov ecx, dword [ebx + 0x1c]
mov dword [ebx + 0x34], eax
xor eax, eax
pop edi
pop esi
mov dword [ebx + 0x20], ecx
mov dword [ebx + 0x28], eax
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x14], eax
mov dword [ebx + 0x18], eax
mov eax, dword [esp + 0x10]
pop ebp
pop ebx
ret