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

Disassembly:
sub esp, 0xf4
push ebx
push ebp
mov ebp, dword [esp + 0x110]
xor ecx, ecx
push esi
push edi
mov edx, dword [ebp + 0x38]
mov eax, dword [ebp + 0x40]
sub eax, edx
mov dword [esp + 0x6c], ecx
cdq
xor eax, edx
mov dword [esp + 0x74], ecx
sub eax, edx
mov edx, dword [ebp + 0x44]
inc eax
mov dword [esp + 0x90], ecx
mov dword [esp + 0x7c], eax
mov eax, dword [ebp + 0x3c]
sub eax, edx
mov dword [esp + 0x94], ecx
cdq
xor eax, edx
mov dword [esp + 0x98], ecx
sub eax, edx
mov edx, dword [ebp + 4]
inc eax
mov dword [esp + 0x30], edx
mov dword [esp + 0xc0], eax
mov eax, dword [ebp + 0xc]
sub eax, edx
mov dword [esp + 0x9c], ecx
cdq
mov ebx, eax
mov eax, dword [ebp + 8]
xor ebx, edx
mov dword [esp + 0x60], ecx
sub ebx, edx
mov edx, dword [ebp + 0x10]
sub eax, edx
mov dword [esp + 0x64], edx
cdq
mov edi, eax
mov eax, dword [esp + 0x120]
xor edi, edx
inc ebx
mov esi, dword [eax + 0xc]
sub edi, edx
mov edx, dword [eax + 0x4c]
mov eax, dword [eax + 0x14]
mov dword [esp + 0x48], edx
inc edi
mov edx, dword [edx]
cmp eax, 0x5dc
mov dword [esp + 0xc8], edi
mov dword [esp + 0x68], eax
mov dword [esp + 0x10], edx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x44], ecx
mov dword [esp + 0x58], ecx
jle 0x5016eb
mov eax, 0x5dc
cmp eax, edx
mov dword [esp + 0x18], eax
mov dword [esp + 0x40], eax
jg 0x5016fb
mov dword [esp + 0x40], edx
mov eax, dword [ebp + 0x44]
mov ecx, dword [esp + 0x64]
mov edx, dword [esp + 0x30]
sub eax, ecx
mov ecx, dword [ebp + 0x38]
imul eax, dword [esp + 0x114]
sub ecx, edx
mov edx, dword [esp + 0x110]
imul ecx, esi
add ecx, edx
add ecx, eax
mov eax, dword [esp + 0x18]
test eax, eax
mov dword [esp + 0x110], ecx
jle 0x50173a
lea ecx, [eax + 1]
imul ecx, ecx
jmp 0x50173c
xor ecx, ecx
mov edx, dword [esp + 0x68]
mov dword [esp + 0x1c], ecx
cmp edx, 0x5dc
jle 0x501763
lea eax, [eax + eax + 1]
add edx, 0xfffffa24
imul eax, edx
add ecx, eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], ecx
mov edx, dword [esp + 0x10]
test edx, edx
jle 0x501788
mov edx, dword [esp + 0x48]
mov eax, dword [edx + 8]
cdq
and edx, 0xff
add eax, edx
sar eax, 8
add ecx, eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], ecx
cmp eax, 0x100
jle 0x5017b5
fild dword [esp + 0x1c]
fsqrt
fldln2
fxch st(1)
fyl2x
fldln2
fld qword [0x521660]
fyl2x
fdivp st(1)
call sub.MSVCRT.dll__ftol
sub eax, 4
mov dword [esp + 0x70], eax
jmp 0x5017bd
mov dword [esp + 0x70], 0
mov ecx, dword [esp + 0x70]
mov eax, dword [esp + 0x1c]
sar eax, cl
mov ecx, dword [ebp + 0x38]
mov dword [esp + 0x38], eax
mov eax, 0x1000000
cdq
idiv dword [esp + 0x38]
inc eax
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x30]
sub eax, ecx
mov dword [esp + 0x84], eax
lea ecx, [eax + ebx - 1]
mov ebx, esi
mov eax, dword [esp + 0x64]
imul ebx, edi
mov dword [esp + 0xcc], ecx
mov ecx, dword [ebp + 0x44]
sub eax, ecx
shl ebx, 2
lea edx, [eax + edi - 1]
push ebx
push 1
mov dword [esp + 0xd8], eax
mov dword [esp + 0xcc], edx
call dword [sym.imp.MSVCRT.dll_calloc]
add esp, 8
mov dword [esp + 0x88], eax
test eax, eax
jne 0x501842
pop edi
pop esi
pop ebp
mov eax, 0xffffff94
pop ebx
add esp, 0xf4
ret
push ebx
push 1
call dword [sym.imp.MSVCRT.dll_calloc]
add esp, 8
mov dword [esp + 0x64], eax
test eax, eax
jne 0x501863
mov dword [esp + 0x6c], 0xffffff94
jmp 0x5028a4
push ebx
push 1
call dword [sym.imp.MSVCRT.dll_calloc]
add esp, 8
mov dword [esp + 0x74], eax
test eax, eax
jne 0x501884
mov dword [esp + 0x6c], 0xffffff94
jmp 0x5028a4
push ebx
push 1
call dword [sym.imp.MSVCRT.dll_calloc]
add esp, 8
mov dword [esp + 0x60], eax
test eax, eax
jne 0x5018a5
mov dword [esp + 0x6c], 0xffffff94
jmp 0x5028a4
mov ecx, dword [esp + 0x11c]
test ecx, ecx
je 0x50196a
mov eax, dword [ecx]
test eax, eax
je 0x50196a
cmp eax, 0x4d0bb0
jne 0x5018dd
mov ebx, dword [ecx + 4]
xor edx, edx
mov eax, dword [ebx + 0xc]
imul eax, dword [ebx + 4]
div dword [ebx + 8]
cmp eax, 1
jb 0x5018e5
mov ebx, eax
jmp 0x5018ea
mov ebx, dword [ecx + 8]
cmp ebx, 1
jae 0x5018ea
mov ebx, 1
mov eax, dword [ecx]
xor edx, edx
mov dword [esp + 0xb8], eax
mov eax, dword [ecx + 4]
mov ecx, dword [esp + 0x7c]
mov dword [esp + 0xbc], eax
mov eax, ecx
mov dword [esp + 0xb4], 1
div ebx
mov dword [esp + 0xb0], ecx
mov dword [esp + 0xa8], 0
test eax, eax
mov dword [esp + 0xac], eax
ja 0x50193b
mov eax, 1
mov dword [esp + 0xac], eax
mov edx, eax
imul edx, ebx
cmp edx, ecx
jae 0x501948
mov eax, ecx
sub eax, edx
mov edx, dword [esp + 0xbc]
mov dword [esp + 0xa0], eax
push edx
push ecx
push 0
mov dword [esp + 0xb0], eax
call dword [esp + 0xc4]
jmp 0x501975
mov dword [esp + 0xb4], 0
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x84]
mov edx, eax
neg edx
cmp edx, ecx
jge 0x50198f
lea edx, [ecx + eax]
mov dword [esp + 0x44], edx
mov edx, dword [esp + 0xcc]
cmp eax, edx
jl 0x5019a0
sub eax, edx
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x10]
mov ebx, eax
neg ebx
cmp ebx, ecx
jge 0x5019b2
add ecx, eax
mov dword [esp + 0x58], ecx
cmp eax, edx
jl 0x5019bc
sub eax, edx
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x18]
test eax, eax
jle 0x501bfa
mov ecx, dword [ebp + 0x44]
mov ebx, dword [ebp + 0x10]
sub ecx, ebx
mov eax, dword [esp + 0x110]
imul ecx, dword [esp + 0x114]
mov edx, dword [esp + 0x88]
mov ebx, dword [esp + 0x74]
sub eax, ecx
mov ecx, dword [esp + 0x64]
test edi, edi
mov dword [esp + 0x1c], eax
mov dword [esp + 0x28], edx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], ebx
jle 0x501bfa
mov dword [esp + 0x50], edi
xor ebx, ebx
test esi, esi
jle 0x501aaa
mov edi, dword [esp + 0x18]
sub edx, ecx
mov dword [esp + 0x38], edx
mov edx, dword [esp + 0x24]
sub edx, ecx
mov ebp, edi
mov dword [esp + 0x30], edx
mov edx, dword [esp + 0x4c]
sub edi, edx
sub ebp, dword [esp + 0x44]
imul edi, esi
imul ebp, esi
add edi, eax
mov dword [esp + 0x2c], edi
mov edi, dword [esp + 0x1c]
mov edx, ebx
sub edx, ebp
xor eax, eax
add ecx, 4
mov al, byte [edx + edi]
mov edi, dword [esp + 0x38]
imul eax, dword [esp + 0x44]
mov dword [edi + ecx - 4], eax
mov eax, dword [esp + 0x2c]
xor edx, edx
mov dl, byte [eax + ebx]
imul edx, dword [esp + 0x4c]
mov dword [ecx - 4], edx
mov edx, dword [esp + 0x44]
lea eax, [edx - 1]
imul eax, dword [edi + ecx - 4]
cdq
sub eax, edx
mov edx, dword [esp + 0x4c]
mov edi, eax
mov eax, dword [esp + 0x30]
sar edi, 1
mov dword [eax + ecx - 4], edi
lea eax, [edx - 1]
imul eax, dword [ecx - 4]
cdq
sub eax, edx
mov edx, dword [esp + 0x30]
sar eax, 1
add eax, edi
inc ebx
mov dword [edx + ecx - 4], eax
cmp ebx, esi
jl 0x501a42
test esi, esi
mov dword [esp + 0x40], 0
jle 0x501ba7
mov edx, dword [esp + 0x18]
mov ebx, dword [esp + 0x44]
mov ebp, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x24]
mov eax, edx
sub eax, ebx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x28]
sub ebp, eax
sub edi, eax
mov dword [esp + 0x38], ebp
jmp 0x501aec
mov edx, dword [esp + 0x18]
mov ebx, dword [esp + 0x30]
cmp ebx, 1
jl 0x501b32
mov ecx, dword [esp + 0x40]
mov ebp, esi
sub ecx, esi
dec edx
neg ebp
add ecx, dword [esp + 0x1c]
mov dword [esp + 0x14], ebx
xor ebx, ebx
mov bl, byte [ecx]
add dword [eax], ebx
xor ebx, ebx
mov bl, byte [ecx]
add ecx, ebp
imul ebx, edx
add dword [edi + eax], ebx
mov ebx, dword [esp + 0x14]
dec edx
dec ebx
mov dword [esp + 0x14], ebx
jne 0x501b08
mov edx, dword [esp + 0x18]
mov ebp, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
mov ebx, edx
sub ebx, dword [esp + 0x4c]
cmp ebx, 1
jl 0x501b6b
dec edx
add ecx, esi
mov dword [esp + 0x14], ebx
xor ebx, ebx
mov bl, byte [ecx]
add dword [eax + ebp], ebx
xor ebx, ebx
mov bl, byte [ecx]
add ecx, esi
imul ebx, edx
add dword [edi + eax], ebx
mov ebx, dword [esp + 0x14]
dec edx
dec ebx
mov dword [esp + 0x14], ebx
jne 0x501b44
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x18]
xor ebx, ebx
add eax, 4
mov bl, byte [ecx]
add dword [eax - 4], ebx
xor ebx, ebx
mov bl, byte [ecx]
imul ebx, edx
mov edx, dword [eax + ebp - 4]
add ebx, edx
mov edx, dword [eax - 4]
add ebx, edx
mov edx, dword [edi + eax - 4]
add edx, ebx
mov dword [edi + eax - 4], edx
mov edx, dword [esp + 0x40]
inc edx
inc ecx
cmp edx, esi
mov dword [esp + 0x40], edx
mov dword [esp + 0x34], ecx
jl 0x501ae8
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x20]
mov ebp, dword [esp + 0x24]
mov ebx, dword [esp + 0x114]
mov edi, dword [esp + 0x50]
lea eax, [esi*4]
add edx, eax
add ecx, eax
add ebp, eax
mov eax, dword [esp + 0x1c]
add eax, ebx
dec edi
mov dword [esp + 0x28], edx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], ebp
mov dword [esp + 0x1c], eax
mov dword [esp + 0x50], edi
jne 0x501a0c
mov edi, dword [esp + 0xc8]
mov ebp, dword [esp + 0x118]
mov eax, dword [ebp + 0x44]
mov ebx, dword [ebp + 0x10]
sub eax, ebx
mov ebx, dword [esp + 0x110]
imul eax, dword [esp + 0x114]
mov ecx, dword [esp + 0x88]
mov edx, dword [esp + 0x74]
sub ebx, eax
mov eax, dword [esp + 0x60]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x64]
test edi, edi
mov dword [esp + 0x24], edx
mov dword [esp + 0x44], eax
mov dword [esp + 0x20], ecx
jle 0x501e09
mov dword [esp + 0x14], edi
mov edi, dword [esp + 0x68]
test esi, esi
jle 0x501def
mov dword [esp + 0x34], esi
test edi, edi
jle 0x501ca8
cmp edi, 0x5dc
jle 0x501c9b
mov ecx, dword [esp + 0x20]
mov ebp, dword [esp + 0x28]
mov ecx, dword [ecx]
add ecx, dword [ebp]
lea ebp, [edi - 0x5dc]
imul ecx, ebp
mov ebp, dword [edx]
add ecx, ebp
mov ebp, dword [esp + 0x20]
mov dword [eax], ecx
mov ecx, 4
add ebp, ecx
mov dword [esp + 0x20], ebp
mov ebp, dword [esp + 0x28]
add ebp, ecx
add edx, ecx
mov dword [esp + 0x28], ebp
mov dword [esp + 0x24], edx
jmp 0x501cae
mov ecx, dword [edx]
add edx, 4
mov dword [eax], ecx
mov dword [esp + 0x24], edx
jmp 0x501cae
mov dword [eax], 0
mov ecx, dword [esp + 0x48]
cmp dword [ecx], 0
jle 0x501dc2
mov edx, dword [esp + 0x58]
add ecx, 0xc
xor eax, eax
mov dword [esp + 0x30], ecx
test edx, edx
mov dword [esp + 0x40], ebx
jle 0x501d02
mov ebp, dword [esp + 0x10]
mov edi, edx
sub edi, ebp
xor edx, edx
imul edi, esi
mov dl, byte [edi + ebx]
mov edi, edx
mov edx, dword [esp + 0x58]
sub ebp, edx
inc ebp
shl ebp, 8
add edi, ebp
test edx, edx
lea ecx, [ecx + edi*4]
jle 0x501d02
mov edi, dword [ecx]
add ecx, 0x400
add eax, edi
dec edx
jne 0x501cf5
mov edx, dword [esp + 0x5c]
test edx, edx
jle 0x501d3f
mov ecx, dword [esp + 0x10]
sub ecx, edx
xor edx, edx
mov edi, ecx
imul edi, esi
inc ecx
mov dl, byte [edi + ebx]
shl ecx, 8
add edx, ecx
mov ecx, dword [esp + 0x48]
add ecx, 0xc
lea ecx, [ecx + edx*4]
mov edx, dword [esp + 0x5c]
test edx, edx
jle 0x501d3f
mov edi, dword [ecx]
add ecx, 0x400
add eax, edi
dec edx
jne 0x501d32
mov edx, dword [esp + 0x48]
mov edi, dword [esp + 0x58]
mov ecx, ebx
lea ebp, [edx + 0xc]
mov edx, dword [esp + 0x10]
sub ecx, esi
add ebp, 0x400
sub edx, edi
je 0x501d74
mov edi, edx
xor edx, edx
add ebp, 0x400
mov dl, byte [ecx]
sub ecx, esi
add eax, dword [ebp + edx*4 - 0x400]
dec edi
jne 0x501d5e
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x5c]
sub ecx, edx
js 0x501dab
inc ecx
mov edi, dword [esp + 0x40]
xor edx, edx
mov dl, byte [edi]
mov edi, edx
mov edx, dword [esp + 0x30]
mov ebp, dword [edx + edi*4]
add edx, 0x400
add eax, ebp
mov ebp, dword [esp + 0x40]
add ebp, esi
dec ecx
mov dword [esp + 0x40], ebp
mov dword [esp + 0x30], edx
jne 0x501d81
mov ecx, dword [esp + 0x44]
mov edi, dword [esp + 0x68]
sar eax, 8
mov edx, dword [ecx]
add edx, eax
mov eax, ecx
mov dword [ecx], edx
mov edx, dword [esp + 0x24]
mov ebp, dword [eax]
mov ecx, dword [esp + 0x70]
shr ebp, cl
mov ecx, dword [esp + 0x34]
add eax, 4
mov dword [esp + 0x44], eax
imul ebp, dword [esp + 0x80]
shr ebp, 0x18
mov dword [eax - 4], ebp
inc ebx
dec ecx
mov dword [esp + 0x34], ecx
jne 0x501c52
mov ecx, dword [esp + 0x114]
sub ecx, esi
add ebx, ecx
mov ecx, dword [esp + 0x14]
dec ecx
mov dword [esp + 0x14], ecx
jne 0x501c46
mov eax, dword [esp + 0x7c]
xor ecx, ecx
test eax, eax
mov dword [esp + 0x40], ecx
jle 0x5028a4
mov edi, ecx
mov edx, dword [esp + 0x108]
imul edi, esi
mov ebp, ecx
xor ebx, ebx
lea eax, [edi + edx]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x84]
sub ebp, edx
mov dword [esp + 0x4c], ebx
cmp ebp, eax
mov dword [esp + 0x44], ebx
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x8c], edi
jge 0x501e64
mov ebx, eax
sub ebx, ecx
add ebx, edx
mov dword [esp + 0x44], ebx
mov ebp, dword [esp + 0xcc]
lea eax, [ecx + edx]
cmp eax, ebp
jl 0x501e7e
mov eax, ecx
sub eax, ebp
lea edx, [eax + edx + 1]
mov dword [esp + 0x4c], edx
mov edx, dword [esp + 0x10]
mov eax, ecx
sub eax, edx
cmp eax, dword [esp + 0x84]
jge 0x501e9e
mov eax, dword [esp + 0x84]
sub eax, ecx
add eax, edx
mov dword [esp + 0x58], eax
lea eax, [ecx + edx]
cmp eax, ebp
jl 0x501eaf
sub ecx, ebp
lea ecx, [ecx + edx + 1]
mov dword [esp + 0x5c], ecx
mov ecx, dword [esp + 0xc0]
xor eax, eax
test ecx, ecx
mov dword [esp + 0x30], eax
jle 0x502552
jmp 0x501eca
mov eax, dword [esp + 0x30]
mov ebx, dword [esp + 0x18]
mov ecx, dword [esp + 0xd0]
mov ebp, dword [esp + 0x10]
mov edx, eax
sub edx, ebx
cmp edx, ecx
jl 0x501ee5
xor edi, edi
jmp 0x501eeb
mov edi, ecx
sub edi, eax
add edi, ebx
mov edx, eax
mov dword [esp + 0x14], edi
sub edx, ebp
cmp edx, ecx
jl 0x501efb
xor edx, edx
jmp 0x501f01
mov edx, ecx
sub edx, eax
add edx, ebp
mov ebp, dword [esp + 0xc4]
lea ecx, [eax + ebx]
cmp ecx, ebp
mov dword [esp + 0x20], edx
jg 0x501f1d
mov dword [esp + 0x1c], 0
jmp 0x501f3e
mov ecx, eax
sub ecx, ebp
mov ebp, dword [esp + 0x50]
add ecx, ebx
mov dword [esp + 0x1c], ecx
mov ecx, esi
neg ecx
lea ecx, [ebp + ecx*4]
mov ebp, dword [esp + 0xc4]
mov dword [esp + 0x50], ecx
mov ecx, dword [esp + 0x10]
add ecx, eax
cmp ecx, ebp
jg 0x501f52
mov dword [esp + 0x28], 0
jmp 0x501f60
mov ecx, eax
sub ecx, ebp
mov ebp, dword [esp + 0x10]
add ecx, ebp
mov dword [esp + 0x28], ecx
test ebx, ebx
jle 0x5021e4
test eax, eax
je 0x502004
mov ebx, dword [esp + 0x3c]
xor ecx, ecx
test esi, esi
jle 0x501fde
mov eax, dword [esp + 0x50]
mov edi, dword [esp + ecx*4 + 0xd4]
mov edx, dword [esp + ecx*4 + 0xe4]
mov ebx, dword [ebx + esi*4]
mov eax, dword [eax]
mov ebp, eax
sub ebp, edi
add ebp, edx
add dword [esp + ecx*4 + 0x90], ebp
mov ebp, dword [esp + 0x34]
sub ebx, dword [ebp]
add ebp, 4
mov dword [esp + 0x34], ebp
add ebx, edi
mov dword [esp + ecx*4 + 0xd4], ebx
mov ebx, dword [esp + 0x3c]
mov edi, dword [ebx + esi*4]
add ebx, 4
sub eax, edi
mov dword [esp + 0x3c], ebx
add eax, edx
mov edx, dword [esp + 0x50]
mov dword [esp + ecx*4 + 0xe4], eax
add edx, 4
inc ecx
mov dword [esp + 0x50], edx
cmp ecx, esi
jl 0x501f7a
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x60]
imul ecx, esi
shl ecx, 2
sub ebx, ecx
cmp eax, ebx
jbe 0x501ffb
mov dword [esp + 0x34], eax
jmp 0x502205
mov dword [esp + 0x34], ebx
jmp 0x502205
sub ebx, edi
mov edx, dword [esp + 0x60]
mov dword [esp + 0x50], ebx
imul ebx, esi
shl ebx, 2
test esi, esi
lea eax, [ebx + edx]
mov dword [esp + 0x3c], eax
jle 0x5021b2
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
sub eax, edx
xor ecx, ecx
mov dword [esp + 0x78], eax
imul eax, esi
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x34], esi
lea ebp, [edx + eax*4]
mov edx, dword [esp + 0x3c]
mov eax, ecx
sub eax, ebx
mov edi, dword [ebp]
imul edi, dword [esp + 0x1c]
mov edx, dword [edx + eax]
mov eax, dword [esp + 0x14]
imul edx, dword [esp + 0x14]
dec eax
mov dword [esp + ecx + 0xd4], edx
imul eax, edx
cdq
sub eax, edx
mov dword [esp + ecx + 0xe4], edi
mov edx, eax
mov eax, dword [esp + 0x1c]
sar edx, 1
dec eax
mov dword [esp + 0x38], edx
imul eax, edi
cdq
sub eax, edx
mov edx, dword [esp + 0x38]
sar eax, 1
add edx, eax
mov eax, dword [esp + 0x34]
mov dword [esp + ecx + 0x90], edx
add ecx, 4
add ebp, 4
dec eax
mov dword [esp + 0x34], eax
jne 0x502041
mov ecx, dword [esp + 0x3c]
mov ebp, dword [esp + 0x50]
xor eax, eax
mov dword [esp + 0x54], ebp
lea edx, [ecx + esi*4]
mov dword [esp + 0x2c], esi
mov dword [esp + 0x34], edx
lea edx, [esp + 0xd4]
sub ecx, edx
mov dword [esp + 0x38], ecx
jmp 0x5020d1
mov ebp, dword [esp + 0x50]
cmp dword [esp + 0x54], 1
jl 0x502114
mov ecx, dword [esp + 0x18]
mov edx, esi
lea edi, [esi*4]
mov dword [esp + 0x54], ebp
lea ebx, [ecx - 1]
mov ecx, eax
neg edx
sub ecx, edi
mov edi, dword [esp + 0x3c]
shl edx, 2
add edi, ecx
mov ecx, dword [edi]
add edi, edx
add dword [esp + eax + 0xd4], ecx
imul ecx, ebx
add dword [esp + eax + 0x90], ecx
dec ebx
dec ebp
jne 0x5020fb
mov ebx, dword [esp + 0x78]
cmp ebx, 1
jl 0x50215a
mov edx, dword [esp + 0x18]
lea edi, [edx - 1]
mov edx, dword [esp + 0x34]
mov ecx, dword [edx]
mov ebp, dword [esp + eax + 0xe4]
add ebp, ecx
imul ecx, edi
mov dword [esp + eax + 0xe4], ebp
mov ebp, dword [esp + eax + 0x90]
add ebp, ecx
lea ecx, [esi*4]
add edx, ecx
dec edi
dec ebx
mov dword [esp + eax + 0x90], ebp
jne 0x502128
mov ecx, dword [esp + 0x38]
mov ebx, dword [esp + eax + 0xd4]
lea edx, [esp + eax + 0xd4]
mov edi, dword [esp + eax + 0xe4]
add eax, 4
mov ecx, dword [ecx + edx]
add ebx, ecx
imul ecx, dword [esp + 0x18]
mov dword [edx], ebx
mov edx, ebx
mov ebx, dword [esp + eax + 0x8c]
add ecx, edi
add ecx, edx
mov edx, dword [esp + 0x34]
add ebx, ecx
mov ecx, dword [esp + 0x2c]
mov dword [esp + eax + 0x8c], ebx
add edx, 4
dec ecx
mov dword [esp + 0x34], edx
mov dword [esp + 0x2c], ecx
jne 0x5020cd
mov edx, dword [esp + 0x18]
mov edi, dword [esp + 0x1c]
lea eax, [edx + edx]
mov edx, dword [esp + 0x14]
mov ecx, eax
mov eax, dword [esp + 0x60]
sub ecx, edi
mov dword [esp + 0x34], eax
sub ecx, edx
inc ecx
imul ecx, esi
lea edx, [eax + ecx*4]
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x50], edx
mov dword [esp + 0x3c], eax
jmp 0x502205
test eax, eax
je 0x5021f1
mov ecx, dword [esp + 0x3c]
lea edx, [ecx + esi*4]
jmp 0x502201
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x60]
sub eax, edx
imul eax, esi
lea edx, [ecx + eax*4]
mov dword [esp + 0x3c], edx
lea eax, [esp + 0xf4]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x68]
cmp eax, 0x5dc
jle 0x50238a
test esi, esi
jle 0x5024cb
mov ebp, dword [esp + 0x3c]
mov dword [esp + 0x54], 0
mov dword [esp + 0x1c], esi
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x20]
mov dword [esp + 0x38], ebp
lea edx, [ecx + 0xc]
xor ecx, ecx
test eax, eax
mov dword [esp + 0x78], edx
jle 0x50227b
mov edi, dword [esp + 0x10]
mov ebx, eax
sub ebx, edi
sub edi, eax
imul ebx, esi
inc edi
mov ebx, dword [ebp + ebx*4]
shl edi, 8
add ebx, edi
test eax, eax
lea edx, [edx + ebx*4]
jle 0x50227b
mov edi, dword [edx]
add edx, 0x400
add ecx, edi
dec eax
jne 0x50226e
mov edx, dword [esp + 0x28]
test edx, edx
jle 0x5022b2
mov eax, dword [esp + 0x10]
sub eax, edx
mov edi, eax
imul edi, esi
inc eax
mov edi, dword [ebp + edi*4]
shl eax, 8
add edi, eax
mov eax, dword [esp + 0x48]
add eax, 0xc
test edx, edx
lea eax, [eax + edi*4]
jle 0x5022b2
mov edi, dword [eax]
add eax, 0x400
add ecx, edi
dec edx
jne 0x5022a6
mov edi, dword [esp + 0x48]
mov ebx, dword [esp + 0x10]
lea edx, [esi*4]
mov eax, ebp
sub eax, edx
add edi, 0x40c
sub ebx, dword [esp + 0x20]
je 0x5022ed
mov dword [esp + 0x2c], ebx
mov ebx, dword [eax]
sub eax, edx
add ecx, dword [edi + ebx*4]
mov ebx, dword [esp + 0x2c]
add edi, 0x400
dec ebx
mov dword [esp + 0x2c], ebx
jne 0x5022d5
mov eax, dword [esp + 0x10]
mov edi, dword [esp + 0x28]
sub eax, edi
js 0x50231e
mov edi, dword [esp + 0x78]
inc eax
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x38]
mov ebx, dword [eax]
add eax, edx
add ecx, dword [edi + ebx*4]
mov ebx, dword [esp + 0x2c]
add edi, 0x400
dec ebx
mov dword [esp + 0x2c], ebx
jne 0x502306
mov edx, dword [esp + 0x54]
mov edi, dword [esp + 0x68]
add edi, 0xfffffa24
add ebp, 4
mov eax, dword [esp + edx + 0xd4]
mov ebx, dword [esp + edx + 0xe4]
add eax, ebx
add edx, 4
imul eax, edi
mov edi, dword [esp + edx + 0x8c]
mov dword [esp + 0x54], edx
add eax, edi
sar ecx, 8
add eax, ecx
mov ecx, dword [esp + 0x70]
shr eax, cl
mov ecx, dword [esp + 0x14]
add ecx, 4
mov dword [esp + 0x14], ecx
imul eax, dword [esp + 0x80]
shr eax, 0x18
mov dword [ecx - 4], eax
mov eax, dword [esp + 0x1c]
dec eax
mov dword [esp + 0x1c], eax
jne 0x502237
jmp 0x5024cb
test esi, esi
jle 0x5024cb
mov ebp, dword [esp + 0x3c]
mov dword [esp + 0x54], 0
mov dword [esp + 0x14], esi
mov edx, dword [esp + 0x48]
mov ecx, dword [esp + 0x20]
add edx, 0xc
xor eax, eax
test ecx, ecx
mov dword [esp + 0x78], edx
mov dword [esp + 0x38], ebp
jle 0x5023e6
mov edi, dword [esp + 0x10]
mov ebx, ecx
sub ebx, edi
sub edi, ecx
imul ebx, esi
inc edi
mov ebx, dword [ebp + ebx*4]
shl edi, 8
add ebx, edi
test ecx, ecx
lea edx, [edx + ebx*4]
jle 0x5023e6
mov edi, dword [edx]
add edx, 0x400
add eax, edi
dec ecx
jne 0x5023d9
mov edx, dword [esp + 0x28]
test edx, edx
jle 0x50241e
mov ecx, dword [esp + 0x10]
sub ecx, edx
mov edi, ecx
imul edi, esi
inc ecx
mov edi, dword [ebp + edi*4]
shl ecx, 8
add edi, ecx
mov ecx, dword [esp + 0x48]
add ecx, 0xc
test edx, edx
lea ecx, [ecx + edi*4]
jle 0x50241e
mov edi, dword [ecx]
add ecx, 0x400
add eax, edi
dec edx
jne 0x502411
mov edi, dword [esp + 0x48]
mov ebx, dword [esp + 0x10]
lea edx, [esi*4]
mov ecx, ebp
sub ecx, edx
add edi, 0x40c
sub ebx, dword [esp + 0x20]
je 0x502459
mov dword [esp + 0x2c], ebx
mov ebx, dword [ecx]
sub ecx, edx
add eax, dword [edi + ebx*4]
mov ebx, dword [esp + 0x2c]
add edi, 0x400
dec ebx
mov dword [esp + 0x2c], ebx
jne 0x502441
mov ecx, dword [esp + 0x10]
mov edi, dword [esp + 0x28]
sub ecx, edi
js 0x50248a
mov edi, dword [esp + 0x78]
inc ecx
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x38]
mov ebx, dword [ecx]
add ecx, edx
add eax, dword [edi + ebx*4]
mov ebx, dword [esp + 0x2c]
add edi, 0x400
dec ebx
mov dword [esp + 0x2c], ebx
jne 0x502472
mov edx, dword [esp + 0x54]
mov ecx, dword [esp + 0x70]
sar eax, 8
mov edi, dword [esp + edx + 0x90]
add edx, 4
add edi, eax
mov eax, dword [esp + 0x14]
shr edi, cl
add ebp, 4
mov dword [esp + 0x54], edx
imul edi, dword [esp + 0x80]
shr edi, 0x18
mov dword [esp + edx + 0xf0], edi
dec eax
mov dword [esp + 0x14], eax
jne 0x5023a2
mov eax, esi
lea ecx, [esp + 0xf4]
dec eax
je 0x502511
sub eax, 2
je 0x5024f6
dec eax
jne 0x50251c
mov eax, dword [esp + 0x24]
mov dl, byte [esp + 0xf4]
lea ecx, [esp + 0xf8]
mov byte [eax], dl
inc eax
jmp 0x5024fa
mov eax, dword [esp + 0x24]
mov dl, byte [ecx]
add ecx, 4
mov byte [eax], dl
inc eax
mov dl, byte [ecx]
add ecx, 4
mov byte [eax], dl
inc eax
mov cl, byte [ecx]
mov byte [eax], cl
inc eax
jmp 0x502520
mov eax, dword [esp + 0x24]
mov cl, byte [ecx]
mov byte [eax], cl
inc eax
jmp 0x502520
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x10c]
mov ecx, dword [esp + 0xc0]
sub edx, esi
add eax, edx
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x30]
inc eax
cmp eax, ecx
mov dword [esp + 0x30], eax
jl 0x501ec6
mov ebx, dword [esp + 0x44]
mov edi, dword [esp + 0x8c]
mov eax, dword [esp + 0xb4]
test eax, eax
je 0x5025ba
mov eax, dword [esp + 0xa0]
dec eax
mov dword [esp + 0xa0], eax
jne 0x5025ba
mov ecx, dword [esp + 0xac]
mov ebp, dword [esp + 0xa4]
mov eax, dword [esp + 0xa8]
mov edx, dword [esp + 0xb0]
mov dword [esp + 0xa4], ecx
mov dword [esp + 0xa0], ecx
mov ecx, dword [esp + 0xbc]
add eax, ebp
push ecx
push edx
push eax
mov dword [esp + 0xb4], eax
call dword [esp + 0xc4]
test eax, eax
je 0x50289c
mov eax, dword [esp + 0x7c]
mov ecx, dword [esp + 0x40]
dec eax
cmp ecx, eax
je 0x502884
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x88]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x118]
mov dword [esp + 0x28], ecx
mov edx, dword [esp + 0x64]
mov ecx, dword [eax + 0x44]
mov ebp, dword [esp + 0x60]
sub ecx, dword [eax + 0x10]
mov eax, dword [esp + 0x110]
mov dword [esp + 0x20], edx
mov dword [esp + 0x44], ebp
imul ecx, dword [esp + 0x114]
sub edi, ecx
mov ecx, dword [esp + 0x18]
add edi, eax
mov eax, edi
mov edi, ecx
sub edi, dword [esp + 0x4c]
sub ecx, ebx
imul ecx, esi
inc edi
mov ebx, ecx
imul edi, esi
mov ecx, eax
add edi, eax
sub ecx, ebx
mov dword [esp + 0x4c], edi
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0xc8]
test ecx, ecx
jle 0x502884
mov dword [esp + 0x38], ecx
test esi, esi
jle 0x502852
lea ebx, [eax + esi]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x54], esi
mov dword [esp + 0x1c], ebx
test eax, eax
jle 0x5026d5
xor eax, eax
xor ecx, ecx
mov al, byte [ebx]
mov cl, byte [edi]
sub ecx, eax
add dword [edx], ecx
mov ecx, dword [esp + 0x28]
mov edx, dword [edx]
inc edi
sub edx, dword [ecx]
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x4c], edi
add edx, eax
add dword [ecx], edx
mov ecx, dword [esp + 0x14]
xor edx, edx
mov dl, byte [ecx]
sub eax, edx
mov edx, dword [esp + 0x28]
add dword [edx], eax
mov eax, dword [esp + 0x68]
inc ecx
cmp eax, 0x5dc
mov dword [esp + 0x14], ecx
jle 0x5026c6
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x28]
mov eax, dword [edx]
add eax, dword [ecx]
mov ecx, dword [esp + 0x68]
add ecx, 0xfffffa24
imul eax, ecx
mov ecx, dword [esp + 0x24]
add eax, dword [ecx]
mov dword [ebp], eax
jmp 0x5026dc
mov edx, dword [esp + 0x24]
mov eax, dword [edx]
mov edx, dword [esp + 0x20]
mov dword [ebp], eax
jmp 0x5026dc
mov dword [ebp], 0
mov ecx, dword [esp + 0x48]
cmp dword [ecx], 0
jle 0x5027f2
mov edx, ecx
xor eax, eax
mov dword [esp + 0x30], ebx
lea ecx, [edx + 0xc]
mov edx, dword [esp + 0x58]
test edx, edx
mov dword [esp + 0x2c], ecx
jle 0x502732
mov ebp, dword [esp + 0x10]
mov edi, edx
sub edi, ebp
xor edx, edx
imul edi, esi
mov dl, byte [edi + ebx]
mov edi, edx
mov edx, dword [esp + 0x58]
sub ebp, edx
inc ebp
shl ebp, 8
add edi, ebp
test edx, edx
lea ecx, [ecx + edi*4]
jle 0x502732
mov edi, dword [ecx]
add ecx, 0x400
add eax, edi
dec edx
jne 0x502725
mov edx, dword [esp + 0x5c]
test edx, edx
jle 0x50276f
mov ecx, dword [esp + 0x10]
sub ecx, edx
xor edx, edx
mov edi, ecx
imul edi, esi
inc ecx
mov dl, byte [edi + ebx]
shl ecx, 8
add edx, ecx
mov ecx, dword [esp + 0x48]
add ecx, 0xc
lea ecx, [ecx + edx*4]
mov edx, dword [esp + 0x5c]
test edx, edx
jle 0x50276f
mov edi, dword [ecx]
add ecx, 0x400
add eax, edi
dec edx
jne 0x502762
mov edx, dword [esp + 0x48]
mov ebp, dword [esp + 0x58]
mov ecx, ebx
lea edi, [edx + 0xc]
mov edx, dword [esp + 0x10]
sub ecx, esi
add edi, 0x400
sub edx, ebp
je 0x5027a4
mov ebp, edx
xor edx, edx
add edi, 0x400
mov dl, byte [ecx]
sub ecx, esi
add eax, dword [edi + edx*4 - 0x400]
dec ebp
jne 0x50278e
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x5c]
sub ecx, edx
js 0x5027db
inc ecx
mov edi, dword [esp + 0x30]
xor edx, edx
mov dl, byte [edi]
mov edi, edx
mov edx, dword [esp + 0x2c]
mov ebp, dword [edx + edi*4]
add edx, 0x400
add eax, ebp
mov ebp, dword [esp + 0x30]
add ebp, esi
dec ecx
mov dword [esp + 0x30], ebp
mov dword [esp + 0x2c], edx
jne 0x5027b1
mov ebp, dword [esp + 0x44]
mov edx, dword [esp + 0x20]
mov edi, dword [esp + 0x4c]
mov ecx, dword [ebp]
sar eax, 8
add ecx, eax
mov dword [ebp], ecx
mov eax, dword [ebp]
mov ecx, dword [esp + 0x70]
shr eax, cl
imul eax, dword [esp + 0x80]
shr eax, 0x18
mov dword [ebp], eax
mov eax, dword [esp + 0x18]
inc ebx
test eax, eax
jle 0x50282f
mov ecx, dword [esp + 0x28]
add edx, 4
add ecx, 4
mov dword [esp + 0x20], edx
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x24]
add ecx, 4
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x54]
add ebp, 4
dec ecx
mov dword [esp + 0x44], ebp
mov dword [esp + 0x54], ecx
jne 0x50265d
mov ecx, dword [esp + 0x114]
mov eax, dword [esp + 0x1c]
jmp 0x502859
mov ecx, dword [esp + 0x114]
mov ebx, ecx
sub ebx, esi
add eax, ebx
mov ebx, ecx
sub ebx, esi
sub ecx, esi
add edi, ebx
mov ebx, dword [esp + 0x14]
add ebx, ecx
mov ecx, dword [esp + 0x38]
dec ecx
mov dword [esp + 0x4c], edi
mov dword [esp + 0x14], ebx
mov dword [esp + 0x38], ecx
jne 0x502646
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x7c]
inc eax
cmp eax, ecx
mov dword [esp + 0x40], eax
jge 0x5028a4
mov ecx, eax
jmp 0x501e1b
mov dword [esp + 0x6c], 1
mov ecx, dword [esp + 0x88]
mov esi, dword [sym.imp.MSVCRT.dll_free]
push ecx
call esi
mov eax, dword [esp + 0x68]
add esp, 4
test eax, eax
je 0x5028c5
push eax
call esi
add esp, 4
mov eax, dword [esp + 0x74]
test eax, eax
je 0x5028d3
push eax
call esi
add esp, 4
mov eax, dword [esp + 0x60]
test eax, eax
je 0x5028e1
push eax
call esi
add esp, 4
mov eax, dword [esp + 0x6c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xf4
ret