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

Disassembly:
mov ecx, dword [0x9aee30]
mov ecx, dword fs:[ecx]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x5031d3
sub esp, 0x74
mov eax, dword [esp + 0x94]
lea ecx, [eax + 1]
mov dword [esp], ecx
call fcn.004fc5b0
mov ecx, dword [esp + 0x94]
lea eax, [ecx - 1]
mov edx, dword [esp + 0x88]
sub edx, ecx
cmp ecx, eax
jbe 0x5031cd
mov dword [esp + 0x34], edx
mov eax, dword [esp + 4]
mov dword [esp + 0x68], eax
mov edx, dword [esp + 0x90]
mov ebx, dword [edx + ecx*4 - 4]
mov dword [esp + 0x4c], ebx
mov ebp, dword [eax + 4]
mov dword [esp + 0x44], ebp
mov esi, dword [eax + 8]
mov dword [esp + 0x48], esi
mov edi, dword [eax]
mov dword [esp + 0x6c], edi
mov dword [esp], ebx
call fcn.004f56a0
mov eax, dword [esp + 4]
mov dword [esp + 0x3c], eax
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x84]
mov ebx, dword [esp + 0x88]
mov ebp, dword [esp + 0x94]
mov esi, dword [esp + 0x98]
mov edi, dword [esp + 0x90]
jmp 0x502e17
dec eax
mov ebp, dword [esp + 0x3c]
mov ebp, ecx
mov esi, dword [esp + 0x98]
mov edi, dword [esp + 0x90]
mov ecx, eax
mov eax, dword [esp + 0x3c]
test ecx, ecx
jl 0x5030ee
lea esi, [ebp + ecx]
mov dword [esp + 0x64], esi
cmp ebx, esi
jle 0x502e3e
jbe 0x5031c4
mov esi, dword [edx + esi*4]
mov dword [esp + 0x38], esi
mov esi, dword [esp + 0x64]
jmp 0x502e4c
mov dword [esp + 0x54], eax
xor eax, eax
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0x50], ecx
mov esi, dword [esp + 0x38]
mov edi, dword [esp + 0x4c]
cmp esi, edi
je 0x502ed4
lea ecx, [ecx + ebp - 1]
cmp ebx, ecx
jbe 0x5031bb
mov ecx, dword [edx + ecx*4]
mov dword [esp], esi
mov dword [esp + 4], ecx
mov dword [esp + 8], edi
mov dword [esp + 0xc], eax
call fcn.004f5550
mov ecx, dword [esp + 0x94]
lea eax, [ecx - 2]
cmp ecx, eax
jbe 0x5031b6
mov ebx, dword [esp + 0x10]
mov ebp, dword [esp + 0x90]
mov eax, dword [ebp + ecx*4 - 8]
mov dword [esp + 0x2c], eax
mov esi, dword [esp + 0x50]
lea edi, [esi + ecx - 2]
mul ebx
nop
nop
nop
mov esi, dword [esp + 0x88]
cmp esi, edi
jbe 0x5031ad
mov esi, dword [esp + 0x14]
mov ebp, dword [esp + 0x84]
mov edi, dword [ebp + edi*4]
jmp 0x50316e
mov esi, 0xffffffff
mov eax, dword [esp + 0x48]
cmp ebp, eax
ja 0x50314b
mov dword [esp + 0x30], esi
mov ecx, dword [esp + 0x6c]
mov dword [esp], ecx
mov dword [esp + 4], ebp
mov dword [esp + 8], eax
mov edx, dword [esp + 0x90]
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], ebp
mov ebx, dword [esp + 0x98]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], 0
call fcn.005045f0
mov eax, dword [esp + 0x94]
mov ecx, dword [esp + 0x44]
cmp eax, ecx
jae 0x503146
mov ebx, dword [esp + 0x20]
mov ebp, dword [esp + 0x6c]
mov dword [ebp + eax*4], ebx
mov esi, dword [esp + 0x50]
lea edi, [ecx + esi]
mov edx, ebp
mov ebp, dword [esp + 0x88]
cmp ebp, edi
jge 0x502f5f
test ebx, ebx
jne 0x502f5f
lea ebx, [ecx - 1]
jmp 0x502f61
mov ebx, ecx
mov dword [esp + 0x28], ebx
lea edi, [ebx + esi]
mov ebx, dword [esp + 0x8c]
cmp ebx, edi
jb 0x50313d
cmp esi, edi
ja 0x503134
sub ebx, esi
mov dword [esp + 0x60], ebx
neg ebx
shl esi, 2
sar ebx, 0x1f
and ebx, esi
mov esi, dword [esp + 0x84]
add ebx, esi
mov edi, dword [esp + 0x50]
cmp ebp, edi
jb 0x50312b
mov dword [esp + 0x70], ebx
mov dword [esp], ebx
mov eax, dword [esp + 0x28]
mov dword [esp + 4], eax
mov esi, dword [esp + 0x60]
mov dword [esp + 8], esi
mov dword [esp + 0xc], ebx
sub ebp, edi
mov dword [esp + 0x5c], ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x48]
mov dword [esp + 0x20], ecx
call fcn.005044b0
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x503008
mov ecx, dword [esp + 0x94]
mov ebx, dword [esp + 0x88]
mov esi, dword [esp + 0x84]
mov ebp, dword [esp + 0x30]
jmp 0x5030b5
mov edx, dword [esp + 0x8c]
mov ecx, dword [esp + 0x64]
cmp edx, ecx
jb 0x503126
mov eax, dword [esp + 0x50]
cmp eax, ecx
ja 0x503121
mov eax, dword [esp + 0x70]
mov dword [esp], eax
mov ecx, dword [esp + 0x94]
mov dword [esp + 4], ecx
mov edx, dword [esp + 0x60]
mov dword [esp + 8], edx
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
mov eax, dword [esp + 0x90]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ecx
mov edx, dword [esp + 0x98]
mov dword [esp + 0x20], edx
call fcn.00504470
mov ecx, dword [esp + 0x94]
mov eax, dword [esp + 0x28]
cmp ecx, eax
jge 0x5030a2
mov ebx, dword [esp + 0x88]
mov eax, dword [esp + 0x64]
cmp ebx, eax
jbe 0x50311a
mov ebp, dword [esp + 0x24]
mov esi, dword [esp + 0x84]
add dword [esi + eax*4], ebp
jmp 0x5030b0
mov ebx, dword [esp + 0x88]
mov esi, dword [esp + 0x84]
mov ebp, dword [esp + 0x30]
dec ebp
mov eax, dword [esp + 0x50]
mov edi, dword [esp + 0x34]
cmp eax, edi
jne 0x5030d8
mov edx, esi
mov esi, dword [esp + 0x7c]
cmp esi, edi
jne 0x5030de
test ebp, ebp
jne 0x5030de
mov esi, dword [esp + 0x78]
jmp 0x502dfc
mov edx, esi
mov esi, dword [esp + 0x7c]
cmp esi, eax
jbe 0x503113
mov esi, dword [esp + 0x78]
mov dword [esi + eax*4], ebp
jmp 0x502dfc
nop
lea eax, [0x96f5c0]
mov dword [esp], eax
lea eax, [0x6cd540]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x68]
mov dword [esp + 8], eax
call fcn.004899b0
add esp, 0x74
ret
mov ecx, esi
call fcn.0046c910
mov ecx, ebx
call fcn.0046c910
call fcn.0046c970
call fcn.0046c950
mov eax, edi
mov ecx, ebp
call fcn.0046c970
mov eax, esi
mov ecx, edi
call fcn.0046c970
mov ecx, edi
mov edx, ebx
call fcn.0046c950
call fcn.0046c910
mov ecx, ebp
mov edx, eax
call fcn.0046c950
mov dword [esp + 0x40], edx
mov eax, ebx
mov esi, dword [esp + 0x2c]
mul esi
nop
nop
nop
mov ebp, dword [esp + 0x84]
mov esi, dword [esp + 0x40]
cmp esi, edx
jb 0x503178
jne 0x503188
cmp eax, edi
jbe 0x503188
mov eax, ebp
mov ebp, dword [esp + 0x4c]
lea edx, [esi + ebp]
dec ebx
cmp esi, edx
jbe 0x503154
jmp 0x50318e
mov eax, ebp
mov ebp, dword [esp + 0x4c]
mov ecx, dword [esp + 0x50]
mov edx, eax
mov ebp, dword [esp + 0x94]
mov edi, dword [esp + 0x4c]
mov esi, ebx
mov ebx, dword [esp + 0x88]
jmp 0x502ed9
mov eax, edi
mov ecx, esi
call fcn.0046c910
call fcn.0046c910
mov eax, ecx
mov ecx, ebx
call fcn.0046c910
mov eax, esi
mov ecx, ebx
call fcn.0046c910
call fcn.0046c910
nop
call fcn.0046b490
jmp fcn.00502d50