Function at 0x4d5bc0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x50
push ebx
push ebp
mov ebp, dword [esp + 0x6c]
push esi
push edi
mov edi, dword [esp + 0x68]
lea esi, [ebp*4 + 4]
lea eax, [esp + 0x44]
push esi
push eax
mov dword [esp + 0x60], edi
mov dword [esp + 0x30], 1
mov dword [esp + 0x4c], 0
call fcn.0046f670
lea ecx, [esp + 0x4c]
push esi
push ecx
mov dword [esp + 0x20], eax
call fcn.0046f670
lea edx, [esp + 0x54]
push esi
push edx
mov dword [esp + 0x30], eax
call fcn.0046f670
add esp, 0x18
test ebp, ebp
mov dword [esp + 0x1c], eax
je 0x4d5c42
mov ecx, edi
mov edx, ebp
mov dword [ecx], 0
add ecx, 4
sub edx, 1
jne 0x4d5c22
mov ecx, eax
mov edx, ebp
mov dword [ecx], 0
add ecx, 4
sub edx, 1
jne 0x4d5c34
mov ebx, dword [esp + 0x7c]
cmp ebp, ebx
mov esi, 1
mov dword [edi], 1
mov dword [eax], 0
mov dword [esp + 0x3c], esi
jle 0x4d5caf
mov eax, dword [esp + 0x78]
mov edi, dword [esp + 0x70]
mov ecx, dword [esp + 0x10]
push ebx
push eax
push ebp
push edi
push 0
push edi
push ecx
call fcn.00474f70
mov edx, dword [esp + 0x84]
mov ecx, dword [esp + 0x94]
mov eax, dword [esp + 0x38]
mov dword [edx], 0
mov ebp, ebx
mov edx, edi
add esp, 0x1c
mov dword [eax], esi
mov dword [esp + 0x28], 0xffffffff
mov dword [esp + 0x74], ebp
mov dword [esp + 0x70], ecx
mov dword [esp + 0x78], edx
jmp 0x4d5cb7
mov edx, dword [esp + 0x78]
mov ecx, dword [esp + 0x70]
xor eax, eax
cmp ebp, 0x11
setge al
mov dword [esp + 0x5c], eax
test ebp, ebp
mov eax, ebp
mov dword [esp + 0x7c], eax
jle 0x4d5ce4
lea edi, [edx + ebp*4 - 4]
cmp dword [edi], 0
jne 0x4d5ce0
sub eax, 1
sub edi, 4
test eax, eax
jg 0x4d5cd1
mov dword [esp + 0x7c], eax
cmp eax, 1
jle 0x4d662f
cmp dword [esp + 0x5c], 0
mov ebx, dword [ecx + ebp*4 - 4]
je 0x4d6083
cmp ebx, 0x10000
mov eax, dword [edx + ebp*4 - 4]
mov ecx, dword [ecx + ebp*4 - 8]
mov dword [esp + 0x38], eax
mov eax, dword [edx + ebp*4 - 8]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x34], eax
jae 0x4d5d2c
cmp ebx, 0x100
sbb ecx, ecx
and ecx, 0xfffffff8
add ecx, 9
jmp 0x4d5d3a
cmp ebx, 0x1000000
sbb ecx, ecx
and ecx, 0xfffffff8
add ecx, 0x19
mov edx, ebx
shr edx, cl
movzx edi, byte [edx + 0x4e9f28]
mov edx, 0x21
sub edx, edi
sub edx, ecx
je 0x4d5db4
mov eax, dword [esp + 0x24]
mov edi, 0x20
sub edi, edx
mov ecx, edi
shr eax, cl
mov ecx, edx
shl ebx, cl
mov ecx, edi
mov dword [esp + 0x48], edi
mov edi, dword [esp + 0x38]
or ebx, eax
mov eax, dword [esp + 0x34]
shr eax, cl
mov ecx, edx
shl dword [esp + 0x24], cl
shl edi, cl
or eax, edi
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x34]
shl eax, cl
cmp ebp, 3
mov dword [esp + 0x34], eax
jl 0x4d5db4
mov ecx, dword [esp + 0x70]
mov edx, dword [ecx + ebp*4 - 0xc]
mov ecx, dword [esp + 0x48]
shr edx, cl
or dword [esp + 0x24], edx
mov edx, dword [esp + 0x78]
mov edx, dword [edx + ebp*4 - 0xc]
shr edx, cl
or eax, edx
mov dword [esp + 0x34], eax
mov ecx, dword [esp + 0x38]
xor edx, edx
cmp ecx, edx
mov edi, 1
mov dword [esp + 0x14], edx
mov dword [esp + 0x30], edx
mov dword [esp + 0x20], edi
mov dword [esp + 0x2c], edx
je 0x4d621d
jmp 0x4d5de4
mov esi, dword [esp + 0x3c]
mov edx, dword [esp + 0x24]
lea ebp, [edi + edx]
cmp ebp, edx
sbb edx, edx
neg edx
add edx, ebx
push edx
mov edx, eax
mov eax, ebp
call fcn.004d5b00
mov ecx, dword [esp + 0x24]
mov ebp, eax
mov eax, dword [esp + 0x38]
add ecx, eax
add esp, 4
cmp ecx, eax
sbb eax, eax
neg eax
add eax, dword [esp + 0x38]
mov dword [esp + 0x54], ecx
mov dword [esp + 0x48], eax
je 0x4d6069
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x14]
mov eax, edx
sub eax, ecx
cmp edx, ecx
sbb edx, edx
neg edx
mov ecx, ebx
sub ecx, edx
mov edx, dword [esp + 0x54]
push ecx
mov ecx, dword [esp + 0x4c]
call fcn.004d5b00
add esp, 4
cmp ebp, eax
jne 0x4d6069
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x20]
mov eax, ebp
imul eax, ecx
add eax, edi
mov dword [esp + 0x40], eax
mov dword [esp + 0x30], eax
mov esi, ebp
imul esi, edx
add esi, dword [esp + 0x14]
mov edi, ecx
mov ecx, dword [esp + 0x34]
mov eax, ebp
shr eax, 0x10
mov dword [esp + 0x50], eax
movzx eax, cx
mov dword [esp + 0x54], eax
mov dword [esp + 0x14], edx
movzx edx, bp
imul eax, edx
mov edx, dword [esp + 0x50]
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x54]
imul eax, edx
mov dword [esp + 0x54], eax
shr ecx, 0x10
mov eax, ecx
imul eax, edx
mov edx, dword [esp + 0x54]
mov dword [esp + 0x48], eax
movzx eax, bp
imul ecx, eax
mov eax, dword [esp + 0x4c]
shr eax, 0x10
add ecx, edx
add eax, ecx
cmp eax, edx
mov dword [esp + 0x20], esi
jae 0x4d5ed7
add dword [esp + 0x48], 0x10000
movzx edx, word [esp + 0x4c]
mov ecx, eax
shl ecx, 0x10
add ecx, edx
cmp dword [esp + 0x24], ecx
sbb edx, edx
neg edx
sub ebx, edx
mov edx, dword [esp + 0x38]
imul ebp, edx
sub ebx, ebp
shr eax, 0x10
sub ebx, eax
sub ebx, dword [esp + 0x48]
mov ebp, edx
mov edx, dword [esp + 0x34]
mov eax, ebx
mov ebx, dword [esp + 0x24]
sub ebx, ecx
mov ecx, dword [esp + 0x2c]
not ecx
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x40]
add ecx, ebx
cmp ecx, ebx
sbb ecx, ecx
neg ecx
add ecx, eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x38], eax
mov eax, edx
mov dword [esp + 0x24], edx
sub eax, edi
cmp edx, edi
sbb edx, edx
neg edx
mov dword [esp + 0x50], ebp
sub ebp, edx
mov edx, dword [esp + 0x40]
push ebp
add edx, ebx
mov dword [esp + 0x38], ebx
call fcn.004d5b00
add esp, 4
cmp ebx, esi
sbb ecx, ecx
mov ebp, eax
mov eax, dword [esp + 0x54]
neg ecx
sub eax, ecx
mov dword [esp + 0x48], eax
je 0x4d6065
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x14]
lea eax, [edx + ecx]
mov dword [esp + 0x4c], eax
mov edx, ebx
sub edx, esi
cmp eax, ecx
mov ecx, dword [esp + 0x48]
sbb eax, eax
neg eax
add eax, dword [esp + 0x50]
push eax
mov eax, dword [esp + 0x50]
call fcn.004d5b00
add esp, 4
cmp ebp, eax
jne 0x4d6065
mov eax, dword [esp + 0x40]
imul esi, ebp
add esi, dword [esp + 0x14]
imul eax, ebp
mov ecx, dword [esp + 0x20]
add eax, edi
mov edi, dword [esp + 0x30]
mov dword [esp + 0x14], ecx
movzx ecx, bx
mov dword [esp + 0x40], eax
mov dword [esp + 0x30], eax
movzx edx, bp
mov dword [esp + 0x20], esi
shr ebx, 0x10
mov esi, ecx
imul esi, edx
mov dword [esp + 0x4c], edx
mov eax, ebp
shr eax, 0x10
imul ecx, eax
mov edx, ebx
imul ebx, dword [esp + 0x4c]
imul edx, eax
mov eax, esi
shr eax, 0x10
add ebx, ecx
add eax, ebx
cmp eax, ecx
jae 0x4d6001
add edx, 0x10000
movzx esi, si
mov ecx, eax
shl ecx, 0x10
add ecx, esi
cmp dword [esp + 0x24], ecx
mov esi, dword [esp + 0x50]
sbb ebx, ebx
neg ebx
sub esi, ebx
mov ebx, dword [esp + 0x54]
imul ebx, ebp
sub esi, ebx
mov ebx, dword [esp + 0x38]
shr eax, 0x10
sub esi, eax
mov eax, dword [esp + 0x24]
sub esi, edx
mov edx, dword [esp + 0x2c]
sub eax, ecx
mov ecx, dword [esp + 0x34]
not edx
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x40]
cmp eax, edx
mov dword [esp + 0x24], ecx
sbb ecx, ecx
neg ecx
mov dword [esp + 0x38], esi
sub esi, ecx
mov dword [esp + 0x34], eax
mov ecx, esi
sub eax, edx
test ecx, ecx
jne 0x4d5de0
mov esi, dword [esp + 0x3c]
cmp dword [esp + 0x2c], 0
je 0x4d620e
mov edx, dword [esp + 0x28]
neg edx
mov dword [esp + 0x28], edx
jmp 0x4d620e
cmp ebx, 0x10000
mov edx, dword [edx + ebp*4 - 4]
mov dword [esp + 0x40], edx
jae 0x4d60a3
cmp ebx, 0x100
sbb ecx, ecx
and ecx, 0xfffffff8
add ecx, 9
jmp 0x4d60b1
cmp ebx, 0x1000000
sbb ecx, ecx
and ecx, 0xfffffff8
add ecx, 0x19
mov eax, ebx
shr eax, cl
movzx edi, byte [eax + 0x4e9f28]
mov eax, 0x21
sub eax, edi
sub eax, ecx
je 0x4d60fa
mov edi, dword [esp + 0x70]
mov edi, dword [edi + ebp*4 - 8]
mov ecx, 0x20
sub ecx, eax
shr edi, cl
mov dword [esp + 0x48], ecx
mov ecx, eax
shl ebx, cl
mov ecx, dword [esp + 0x78]
or ebx, edi
mov edi, dword [ecx + ebp*4 - 8]
mov ecx, dword [esp + 0x48]
shr edi, cl
mov ecx, eax
shl edx, cl
or edx, edi
mov dword [esp + 0x40], edx
xor eax, eax
test edx, edx
mov edi, 1
mov dword [esp + 0x14], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x20], edi
mov dword [esp + 0x2c], eax
je 0x4d621d
lea esp, [esp]
mov ecx, dword [esp + 0x20]
lea ebp, [edx + ecx]
test ebp, ebp
je 0x4d61fd
mov ecx, edx
sub ecx, eax
xor edx, edx
lea eax, [ebx + edi]
div ecx
xor edx, edx
mov ecx, eax
mov eax, ebx
sub eax, dword [esp + 0x14]
div ebp
cmp ecx, eax
jne 0x4d61fd
mov edx, dword [esp + 0x30]
mov ebp, dword [esp + 0x20]
mov eax, ecx
imul eax, edx
add eax, edi
mov edi, edx
mov edx, eax
mov eax, ecx
imul eax, ebp
add eax, dword [esp + 0x14]
mov dword [esp + 0x14], ebp
mov ebp, dword [esp + 0x40]
imul ecx, ebp
sub ebx, ecx
mov ecx, ebx
mov ebx, ebp
mov ebp, dword [esp + 0x2c]
not ebp
mov dword [esp + 0x2c], ebp
mov ebp, ecx
sub ebp, eax
mov dword [esp + 0x30], edx
mov dword [esp + 0x20], eax
mov dword [esp + 0x40], ecx
je 0x4d61fd
add ecx, edx
xor edx, edx
mov eax, ebx
sub eax, edi
div ecx
mov edx, dword [esp + 0x14]
mov ecx, eax
lea eax, [ebx + edx]
xor edx, edx
div ebp
cmp ecx, eax
jne 0x4d61fd
mov edx, dword [esp + 0x30]
mov ebp, dword [esp + 0x20]
mov eax, ecx
imul eax, edx
add eax, edi
mov edi, edx
mov edx, ecx
imul edx, ebp
add edx, dword [esp + 0x14]
mov dword [esp + 0x14], ebp
mov ebp, dword [esp + 0x2c]
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x40]
imul ecx, edx
sub ebx, ecx
mov ecx, ebx
mov ebx, edx
mov edx, ecx
sub ecx, eax
not ebp
mov dword [esp + 0x30], eax
mov dword [esp + 0x40], edx
mov dword [esp + 0x2c], ebp
jne 0x4d6120
cmp dword [esp + 0x2c], 0
je 0x4d620e
mov eax, dword [esp + 0x28]
neg eax
mov dword [esp + 0x28], eax
cmp dword [esp + 0x14], 0
mov ebp, dword [esp + 0x74]
jne 0x4d6326
mov ecx, dword [esp + 0x7c]
mov edx, dword [esp + 0x78]
mov eax, dword [esp + 0x70]
push ecx
push edx
push ebp
push eax
push 0
push eax
mov eax, dword [esp + 0x30]
push eax
call fcn.00474f70
mov edi, dword [esp + 0x2c]
add esp, 0x1c
test esi, esi
je 0x4d6268
mov edx, dword [esp + 0x68]
mov ecx, dword [edx]
lea ebx, [esi - 1]
add edx, 4
test ebx, ebx
mov eax, edi
je 0x4d6266
mov dword [eax], ecx
mov ecx, dword [edx]
add eax, 4
add edx, 4
sub ebx, 1
jne 0x4d6257
mov dword [eax], ecx
sub ebp, dword [esp + 0x7c]
mov ebx, dword [esp + 0x1c]
add ebp, 1
mov dword [esp + 0x74], ebp
je 0x4d628e
lea eax, [ebx + esi*4]
mov ecx, ebp
mov edi, edi
mov dword [eax], 0
add eax, 4
sub ecx, 1
jne 0x4d6280
cmp dword [esp + 0x74], 0
jle 0x4d62da
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x74]
lea ecx, [edi + esi*4]
sub eax, edi
mov ebp, edi
mov dword [esp + 0x54], ecx
mov dword [esp + 0x48], eax
mov dword [esp + 0x50], edx
mov eax, dword [esp + 0x48]
mov ecx, dword [eax + ebp]
push ecx
push esi
push ebx
push ebp
call fcn.00470a60
mov ecx, dword [esp + 0x64]
mov dword [ecx], eax
add ecx, 4
add esp, 0x10
add ebp, 4
sub dword [esp + 0x50], 1
mov dword [esp + 0x54], ecx
jne 0x4d62b0
add esi, dword [esp + 0x74]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x78]
mov ebp, dword [esp + 0x7c]
xor edx, edx
cmp dword [edi + esi*4 - 4], edx
mov dword [esp + 0x1c], edi
sete dl
mov dword [esp + 0x74], ebp
sub esi, edx
neg eax
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x68]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x70]
mov dword [esp + 0x3c], esi
mov dword [esp + 0x68], ebx
mov dword [esp + 0x70], ecx
mov dword [esp + 0x78], eax
mov edx, eax
jmp 0x4d5cc3
test edi, edi
jne 0x4d6470
test ebp, ebp
je 0x4d6383
mov edx, dword [esp + 0x78]
mov ecx, dword [edx]
mov eax, dword [esp + 0x10]
lea ebx, [ebp - 1]
mov edi, ebx
add edx, 4
test edi, edi
je 0x4d6357
mov dword [eax], ecx
mov ecx, dword [edx]
add eax, 4
add edx, 4
sub edi, 1
jne 0x4d6348
mov edx, dword [esp + 0x70]
mov edi, dword [esp + 0x18]
mov dword [eax], ecx
mov ecx, dword [edx]
add edx, 4
test ebx, ebx
mov eax, edi
je 0x4d637f
lea esp, [esp]
mov dword [eax], ecx
mov ecx, dword [edx]
add eax, 4
add edx, 4
sub ebx, 1
jne 0x4d6370
mov dword [eax], ecx
jmp 0x4d6387
mov edi, dword [esp + 0x18]
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x78]
push edx
push ebp
push eax
push edi
call fcn.004709c0
mov eax, dword [esp + 0x20]
mov ebx, dword [esp + 0x80]
mov dword [esp + 0x80], eax
mov eax, edi
mov edi, dword [esp + 0x88]
add esp, 0x10
test esi, esi
mov dword [esp + 0x10], ebx
mov dword [esp + 0x78], eax
je 0x4d63f5
mov edx, dword [esp + 0x1c]
lea ecx, [esi - 1]
mov dword [esp + 0x74], ecx
mov ecx, dword [edx]
add edx, 4
cmp dword [esp + 0x74], 0
mov eax, ebx
je 0x4d63ef
mov ebx, dword [esp + 0x74]
nop
mov dword [eax], ecx
mov ecx, dword [edx]
add eax, 4
add edx, 4
sub ebx, 1
jne 0x4d63e0
mov ebx, dword [esp + 0x10]
mov dword [eax], ecx
test esi, esi
mov dword [ebx + esi*4], 0
je 0x4d6427
mov edx, dword [esp + 0x68]
mov ecx, dword [edx]
lea ebx, [esi - 1]
add edx, 4
test ebx, ebx
mov eax, edi
je 0x4d6421
mov dword [eax], ecx
mov ecx, dword [edx]
add eax, 4
add edx, 4
sub ebx, 1
jne 0x4d6412
mov ebx, dword [esp + 0x10]
mov dword [eax], ecx
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
push edx
push esi
push eax
push edi
call fcn.00470a60
mov edx, dword [esp + 0x78]
xor ecx, ecx
add esp, 0x10
test eax, eax
setne cl
mov dword [edi + esi*4], eax
mov dword [esp + 0x10], edx
mov dword [esp + 0x68], ebx
add ecx, esi
mov eax, ecx
cmp eax, esi
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edi
jle 0x4d660f
mov esi, eax
jmp 0x4d660b
cmp dword [esp + 0x2c], 0
mov ebx, dword [esp + 0x10]
je 0x4d64c1
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x78]
push edx
push ebp
push eax
push ebx
call fcn.00470b00
mov ecx, dword [esp + 0x80]
push edi
push ebp
push ecx
push ebx
call fcn.004709c0
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x90]
mov ecx, dword [esp + 0x38]
push edx
push ebp
push eax
push ecx
call fcn.00470b00
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0xa8]
jmp 0x4d6505
mov edx, dword [esp + 0x70]
push edi
push ebp
push edx
push ebx
call fcn.00470b00
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x88]
push eax
push ebp
push ecx
push ebx
call fcn.004709c0
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x98]
mov ecx, dword [esp + 0x38]
push edx
push ebp
push eax
push ecx
call fcn.00470b00
mov edx, dword [esp + 0x60]
mov eax, dword [esp + 0xa0]
mov ecx, dword [esp + 0x48]
push edx
push ebp
push eax
push ecx
call fcn.004709c0
mov edx, dword [esp + 0xb8]
mov eax, ebx
mov ebx, dword [esp + 0xb0]
add esp, 0x40
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x18]
push edi
mov dword [esp + 0x7c], eax
mov eax, dword [esp + 0x6c]
push esi
push eax
push ebx
mov dword [esp + 0x28], edx
call fcn.00470b00
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x2c]
push ecx
push esi
push edx
push ebx
mov edi, eax
call fcn.00470a60
add esp, 0x20
add eax, edi
mov ecx, 0
setne cl
mov dword [ebx + esi*4], eax
add ecx, esi
cmp eax, edi
mov dword [esp + 0x74], ecx
jae 0x4d658a
mov edx, dword [esp + 0x18]
mov eax, ecx
mov dword [ebx + eax*4], 1
mov dword [edx + eax*4], 0
add eax, 1
mov dword [esp + 0x74], eax
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
push eax
push esi
push ecx
push edi
call fcn.00470b00
mov edx, dword [esp + 0x40]
push edx
mov dword [esp + 0x90], eax
mov eax, dword [esp + 0x7c]
push esi
push eax
push edi
call fcn.00470a60
mov edx, dword [esp + 0x9c]
add esp, 0x20
add eax, edx
mov ecx, 0
setne cl
mov dword [edi + esi*4], eax
add ecx, esi
cmp eax, edx
mov esi, dword [esp + 0x74]
jae 0x4d65ed
cmp ecx, esi
mov dword [edi + ecx*4], 1
jl 0x4d65ea
mov dword [ebx + ecx*4], 0
add ecx, 1
cmp ecx, esi
mov edx, dword [esp + 0x68]
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x10], edx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edi
jle 0x4d660b
mov esi, ecx
mov dword [esp + 0x3c], esi
mov edx, dword [esp + 0x70]
xor ecx, ecx
cmp dword [edx + ebp*4 - 4], ecx
mov edx, dword [esp + 0x78]
sete cl
sub ebp, ecx
mov ecx, dword [esp + 0x70]
mov dword [esp + 0x74], ebp
jmp 0x4d5cc3
test eax, eax
jne 0x4d66ce
mov eax, dword [esp + 0x64]
cmp eax, ecx
je 0x4d6664
test eax, eax
je 0x4d6664
test ebp, ebp
je 0x4d6664
mov edx, dword [ecx]
lea edi, [ebp - 1]
add ecx, 4
test edi, edi
je 0x4d6662
mov dword [eax], edx
mov edx, dword [ecx]
add eax, 4
add ecx, 4
sub edi, 1
jne 0x4d6653
mov dword [eax], edx
test esi, esi
mov edx, dword [esp + 0x68]
jle 0x4d667f
lea eax, [edx + esi*4 - 4]
cmp dword [eax], 0
jne 0x4d667f
sub esi, 1
sub eax, 4
test esi, esi
jg 0x4d6670
mov eax, dword [esp + 0x58]
cmp eax, edx
je 0x4d66a8
test esi, esi
je 0x4d66a8
mov ecx, dword [edx]
lea edi, [esi - 1]
add edx, 4
test edi, edi
je 0x4d66a6
mov dword [eax], ecx
mov ecx, dword [edx]
add eax, 4
add edx, 4
sub edi, 1
jne 0x4d6697
mov dword [eax], ecx
cmp dword [esp + 0x28], 0
jge 0x4d66b1
neg esi
mov ecx, dword [esp + 0x44]
mov eax, dword [esp + 0x6c]
push ecx
mov dword [eax], esi
call fcn.0046f6a0
add esp, 4
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x50
ret
mov edx, dword [edx]
mov ebx, dword [esp + 0x18]
push edx
push ebp
push ecx
push 0
push ebx
mov dword [esp + 0x88], edx
call fcn.00475bc0
add esp, 0x14
test esi, esi
mov dword [esp + 0x54], eax
je 0x4d6716
mov edx, dword [esp + 0x68]
mov ecx, dword [edx]
mov eax, dword [esp + 0x10]
lea edi, [esi - 1]
add edx, 4
test edi, edi
je 0x4d6714
mov dword [eax], ecx
mov ecx, dword [edx]
add eax, 4
add edx, 4
sub edi, 1
jne 0x4d6705
mov dword [eax], ecx
xor edx, edx
cmp dword [ebx + ebp*4 - 4], edx
sete dl
sub ebp, edx
cmp esi, ebp
jge 0x4d67b8
mov ecx, ebp
sub ecx, esi
je 0x4d674e
mov eax, dword [esp + 0x10]
lea eax, [eax + esi*4]
jmp 0x4d6740
mov dword [eax], 0
add eax, 4
sub ecx, 1
jne 0x4d6740
test ebp, ebp
je 0x4d676e
mov ecx, dword [esp + 0x1c]
lea eax, [ecx + esi*4]
mov ecx, ebp
jmp 0x4d6760
mov dword [eax], 0
add eax, 4
sub ecx, 1
jne 0x4d6760
test esi, esi
jle 0x4d6826
mov ebx, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
sub eax, ebx
lea edi, [ebx + ebp*4]
mov dword [esp + 0x5c], eax
mov dword [esp + 0x7c], esi
jmp 0x4d6790
mov edx, dword [esp + 0x5c]
mov eax, dword [edx + ebx]
mov ecx, dword [esp + 0x18]
push eax
push ebp
push ecx
push ebx
call fcn.00470a60
mov dword [edi], eax
add esp, 0x10
add ebx, 4
add edi, 4
sub dword [esp + 0x7c], 1
jne 0x4d6790
jmp 0x4d6826
test ebp, ebp
je 0x4d6826
mov edx, dword [esp + 0x1c]
lea eax, [edx + esi*4]
mov ecx, ebp
jmp 0x4d67d0
mov dword [eax], 0
add eax, 4
sub ecx, 1
jne 0x4d67d0
test ebp, ebp
jle 0x4d6826
mov ebx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
sub eax, ebx
lea edi, [ebx + esi*4]
mov dword [esp + 0x48], eax
mov dword [esp + 0x7c], ebp
jmp 0x4d6800
mov eax, dword [esp + 0x48]
mov ecx, dword [ebx + eax]
mov edx, dword [esp + 0x1c]
push ecx
push esi
push edx
push ebx
call fcn.00470a60
mov dword [edi], eax
add esp, 0x10
add ebx, 4
add edi, 4
sub dword [esp + 0x7c], 1
jne 0x4d6800
mov ecx, dword [esp + 0x74]
mov edi, dword [esp + 0x68]
mov ebx, dword [esp + 0x1c]
xor eax, eax
add esi, ebp
mov ebp, dword [esp + 0x10]
cmp dword [ebp + esi*4 - 4], eax
sete al
sub esi, eax
mov eax, dword [esp + 0x28]
neg eax
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x54]
test eax, eax
mov dword [esp + 0x74], eax
je 0x4d68fe
lea ecx, [ecx]
mov eax, ecx
xor edx, edx
div dword [esp + 0x74]
mov dword [esp + 0x5c], eax
imul eax, dword [esp + 0x74]
sub ecx, eax
test esi, esi
mov dword [esp + 0x54], ecx
je 0x4d68af
lea ecx, [esi - 1]
mov dword [esp + 0x68], ecx
cmp dword [esp + 0x68], 0
mov ecx, dword [ebx]
lea edx, [ebx + 4]
mov eax, edi
mov dword [esp + 0x7c], edx
je 0x4d68ad
mov edx, dword [esp + 0x7c]
mov dword [eax], ecx
mov ecx, dword [edx]
add edx, 4
add eax, 4
sub dword [esp + 0x68], 1
mov dword [esp + 0x7c], edx
jne 0x4d6894
mov dword [eax], ecx
mov eax, dword [esp + 0x5c]
push eax
push esi
push ebp
push edi
mov dword [ebp + esi*4], 0
call fcn.00470a60
mov edx, dword [esp + 0x38]
mov dword [edi + esi*4], eax
xor ecx, ecx
add esi, 1
add esp, 0x10
cmp dword [edi + esi*4 - 4], ecx
mov eax, ebx
sete cl
mov ebx, ebp
mov ebp, edi
mov edi, eax
mov eax, dword [esp + 0x54]
neg edx
mov dword [esp + 0x28], edx
sub esi, ecx
test eax, eax
mov ecx, dword [esp + 0x74]
mov dword [esp + 0x74], eax
jne 0x4d6860
mov eax, dword [esp + 0x64]
test eax, eax
je 0x4d6908
mov dword [eax], ecx
test esi, esi
jle 0x4d691f
lea eax, [ebx + esi*4 - 4]
cmp dword [eax], 0
jne 0x4d691f
sub esi, 1
sub eax, 4
test esi, esi
jg 0x4d6910
mov eax, dword [esp + 0x58]
cmp eax, ebx
je 0x4d6948
test esi, esi
je 0x4d6948
mov ecx, dword [ebx]
lea edx, [esi - 1]
add ebx, 4
test edx, edx
je 0x4d6946
mov dword [eax], ecx
mov ecx, dword [ebx]
add eax, 4
add ebx, 4
sub edx, 1
jne 0x4d6937
mov dword [eax], ecx
cmp dword [esp + 0x28], 0
jge 0x4d6951
neg esi
mov ecx, dword [esp + 0x44]
mov eax, dword [esp + 0x6c]
push ecx
mov dword [eax], esi
call fcn.0046f6a0
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x50
ret