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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
lea eax, [esp - 0x38]
cmp eax, dword [ecx + 8]
jbe 0x502e22
sub esp, 0xb8
mov edx, dword [esp + 0xe0]
test edx, edx
je 0x502d98
mov ecx, dword [esp + 0xe4]
lea ebx, [ecx - 1]
mov ebp, dword [esp + 0xcc]
mov esi, dword [esp + 0xc4]
mov edi, dword [esp + 0xbc]
mov eax, dword [esp + 0xc0]
mov dword [esp + 0xa8], eax
xor eax, eax
mov dword [esp + 0x58], eax
xor eax, eax
mov dword [esp + 0x54], eax
xor eax, eax
mov dword [esp + 0xb4], eax
mov eax, dword [esp + 0xa8]
jmp 0x5029a9
mov esi, dword [esp + 0x64]
mov ebx, edx
lea edx, [0x683bc0]
test ebx, ebx
jle 0x5027d3
lea edx, [ebx - 1]
cmp edx, ecx
jae 0x502e0e
lea esi, [ebx + ebx*4]
lea esi, [edi + esi*4 - 8]
cmp dword [esi], ebp
jg 0x5027ad
cmp ebx, ecx
jae 0x502e07
lea edx, [ebx + ebx*4]
lea ebp, [edi + edx*4 + 0xc]
mov esi, dword [esp + 0x64]
cmp dword [ebp], esi
jge 0x502a4b
xor edx, edx
test dl, dl
je 0x502a44
lea edx, [ebx - 1]
test edx, edx
jl 0x502def
cmp edx, ecx
jae 0x502de8
mov dword [esp + 0x70], edx
lea ecx, [edx + edx*4]
mov dword [esp + 0x80], ecx
mov ebx, dword [edi + ecx*4]
mov ebp, dword [edi + ecx*4 + 4]
mov esi, dword [edi + ecx*4 + 8]
mov edx, dword [esp + 0xb0]
mov dword [esp], edx
mov dword [esp + 4], eax
mov ecx, dword [esp + 0x50]
mov dword [esp + 8], ecx
mov edi, dword [esp + 0xb4]
mov dword [esp + 0xc], edi
mov edi, dword [esp + 0x54]
mov dword [esp + 0x10], edi
mov edi, dword [esp + 0x58]
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], esi
call fcn.004fd800
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
mov ebx, dword [esp + 0x30]
mov dword [esp + 0xbc], ebx
mov ebp, dword [esp + 0x34]
mov dword [esp + 0xc0], ebp
mov esi, dword [esp + 0x38]
mov edi, dword [esp + 0x80]
mov ebx, dword [esp + 0xe0]
mov edi, dword [ebx + edi*4 + 0x10]
mov ebp, dword [esp + 0x84]
sub ebp, edi
mov edi, dword [esp + 0x84]
cmp ebp, edi
ja 0x502ddf
mov dword [esp + 0x58], edx
mov dword [esp + 0xb4], eax
mov dword [esp + 0x54], ecx
mov dword [esp + 0x78], ebp
mov dword [esp + 0xc4], esi
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
mov esi, dword [esp + 0xd0]
sub esi, ebp
mov dword [esp + 0x80], esi
xchg esi, ebx
neg ebx
xchg esi, ebx
sar esi, 0x1f
and esi, ebp
mov eax, dword [esp + 0xc8]
add esi, eax
mov dword [esp + 0xc], esi
sub edi, ebp
mov dword [esp + 0x10], edi
mov esi, dword [esp + 0x80]
mov dword [esp + 0x14], esi
mov esi, dword [esp + 0xd4]
mov dword [esp + 0x18], esi
mov edi, dword [esp + 0xd8]
mov dword [esp + 0x1c], edi
mov eax, dword [esp + 0xdc]
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ebx
mov edi, dword [esp + 0x70]
mov dword [esp + 0x28], edi
mov eax, dword [esp + 0xe8]
mov dword [esp + 0x2c], eax
call fcn.00502730
mov eax, dword [esp + 0xe4]
mov ecx, dword [esp + 0xe0]
mov edx, dword [esp + 0x78]
mov ebx, dword [esp + 0xb4]
mov ebp, dword [esp + 0x54]
mov esi, dword [esp + 0x58]
mov edi, dword [esp + 0x70]
mov ecx, eax
mov edx, dword [esp + 0xe0]
mov eax, dword [esp + 0xc0]
mov edi, dword [esp + 0xbc]
mov esi, dword [esp + 0xc4]
mov ebx, dword [esp + 0x70]
mov ebp, dword [esp + 0x78]
cmp dword [0x67e110], eax
jge 0x502ad8
mov dword [esp + 0xb0], edi
mov dword [esp + 0x50], esi
mov dword [esp + 0x84], ebp
lea ebp, [eax - 1]
test ebp, ebp
jl 0x502acb
mov esi, dword [edi + eax*4 - 4]
nop
cmp esi, 0x10000
jb 0x502ab2
shr esi, 0x10
mov dword [esp + 0x98], eax
mov eax, 0x10
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x98]
cmp esi, 0x100
jb 0x502aa9
shr esi, 8
mov edi, dword [esp + 0x60]
add edi, 8
cmp esi, 0x100
jae 0x502e15
shl ebp, 5
lea edx, [0x683bc0]
movzx esi, byte [edx + esi]
add esi, edi
add ebp, esi
mov dword [esp + 0x64], ebp
mov esi, ebp
sar ebp, 1
mov edi, dword [esp + 0xe0]
jmp 0x5027b9
mov edx, ebx
jmp 0x502804
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x4c], eax
mov ecx, dword [edi + edx*4]
mov ebx, dword [edi + edx*4 + 4]
mov edx, dword [edi + edx*4 + 8]
mov dword [esp], ecx
mov dword [esp + 4], ebx
mov dword [esp + 8], edx
mov ecx, dword [esp + 0xb0]
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], eax
mov edx, dword [esp + 0x50]
mov dword [esp + 0x14], edx
call fcn.004fad10
mov eax, dword [esp + 0x18]
test eax, eax
setge dl
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0xe4]
mov ebx, dword [esp + 0x7c]
mov edi, dword [esp + 0xe0]
jmp 0x5027f1
mov edi, dword [esp + 0x60]
jmp 0x502a13
mov dword [esp + 0xa0], eax
xor eax, eax
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0xa0]
jmp 0x5029fd
lea edx, [0x683bc0]
xor ebp, ebp
jmp 0x502a30
mov dword [esp + 0xcc], ebp
mov edx, dword [esp + 0xd4]
cmp edx, 0xa
jne 0x502c35
mov ecx, ebp
jmp 0x502b78
add ebx, 0x30
mov byte [ebp + esi - 1], bl
mov ebx, dword [esp + 0x68]
inc ebx
mov ebp, dword [esp + 0xd8]
mov edx, dword [esp + 0xc4]
mov dword [esp + 0x68], ebx
mov ebx, eax
mov eax, dword [esp + 0xbc]
mov edx, dword [esp + 0x68]
cmp ebp, edx
jle 0x502c02
mov ebp, dword [esp + 0x84]
test ebp, ebp
jle 0x502b61
lea edx, [ebp - 1]
mov dword [esp + 0x84], edx
mov eax, 0xcccccccd
mul ebx
shr edx, 3
mov eax, edx
lea edx, [edx + edx*4]
shl edx, 1
sub ebx, edx
mov edx, dword [esp + 0x84]
cmp edx, edi
jb 0x502af6
jmp 0x502dd6
mov eax, ecx
mov esi, dword [esp + 0xc4]
mov edi, dword [esp + 0xbc]
mov ecx, dword [esp + 0xcc]
test eax, eax
jle 0x502c0e
mov dword [esp + 0x74], ebp
mov dword [esp], edi
mov dword [esp + 4], eax
mov dword [esp + 8], esi
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], esi
mov eax, dword [esp + 0xdc]
mov dword [esp + 0x18], eax
call fcn.004fd5a0
mov eax, dword [esp + 0x1c]
mov dword [esp + 0xbc], eax
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
mov dword [esp + 0xc4], edx
mov ebx, dword [esp + 0x28]
mov ebp, dword [esp + 0xd8]
mov esi, dword [esp + 0xc8]
mov edi, dword [esp + 0xcc]
mov dword [esp + 0x90], eax
xor eax, eax
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x74]
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x90]
jmp 0x502b1d
mov ebp, dword [esp + 0x84]
jmp 0x502b61
mov edx, dword [esp + 0xc8]
jmp 0x502c1e
mov byte [ebp + edx - 1], 0x30
mov ebp, eax
test ebp, ebp
jle 0x502c2e
lea eax, [ebp - 1]
cmp eax, ecx
jb 0x502c17
jmp 0x502db9
add esp, 0xb8
ret
mov ecx, ebp
jmp 0x502cfb
mov byte [esp + 0x4b], dl
mov edx, dword [esp + 0xc8]
movzx ecx, byte [esp + 0x4b]
mov byte [edi + edx - 1], cl
mov edx, dword [esp + 0x6c]
inc edx
mov dword [esp + 0x6c], edx
mov edi, eax
mov eax, dword [esp + 0x5c]
xor edx, edx
div ebp
mov edx, dword [esp + 0xd8]
mov ecx, dword [esp + 0xc0]
mov edx, dword [esp + 0xc4]
mov ebx, eax
mov dword [esp + 0x84], edi
mov eax, dword [esp + 0xbc]
mov edi, dword [esp + 0xd8]
mov edx, dword [esp + 0x6c]
cmp edi, edx
jle 0x502d8c
mov edi, dword [esp + 0x84]
test edi, edi
jle 0x502cdb
test ebp, ebp
je 0x502dd1
mov eax, ebx
xor edx, edx
div ebp
cmp edx, 0x3e
jae 0x502dc5
mov dword [esp + 0x5c], ebx
lea eax, [edi - 1]
lea ebx, [0x589f09]
movzx edx, byte [ebx + edx]
cmp eax, esi
jb 0x502c3c
jmp 0x502dbe
mov ecx, esi
mov edx, ebp
mov eax, dword [esp + 0xc0]
mov esi, dword [esp + 0xc4]
mov edi, dword [esp + 0xbc]
mov ebp, dword [esp + 0x84]
test eax, eax
jle 0x502c0e
mov dword [esp + 0x74], ebp
mov dword [esp], edi
mov dword [esp + 4], eax
mov dword [esp + 8], esi
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], esi
mov eax, dword [esp + 0xdc]
mov dword [esp + 0x18], eax
call fcn.004fd5a0
mov eax, dword [esp + 0x1c]
mov dword [esp + 0xbc], eax
mov ecx, dword [esp + 0x20]
mov dword [esp + 0xc0], ecx
mov edx, dword [esp + 0x24]
mov dword [esp + 0xc4], edx
mov ebx, dword [esp + 0x28]
mov ebp, dword [esp + 0xd4]
mov esi, dword [esp + 0xcc]
mov edi, dword [esp + 0xd8]
mov dword [esp + 0x88], eax
xor eax, eax
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x74]
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x88]
jmp 0x502c8f
mov edi, dword [esp + 0x84]
jmp 0x502cdb
mov ebp, dword [esp + 0xcc]
mov eax, dword [esp + 0xc0]
mov esi, dword [esp + 0xc4]
mov edi, dword [esp + 0xbc]
jmp 0x502ad8
call fcn.0045a170
mov ecx, esi
call fcn.0045a170
mov eax, edx
mov ecx, 0x3e
call fcn.0045a180
call fcn.0042e710
mov eax, edx
mov ecx, edi
call fcn.0045a170
mov eax, ebp
mov ecx, edi
call fcn.0045a1d0
mov eax, edx
call fcn.0045a170
lea eax, [0x550cc0]
mov dword [esp], eax
lea eax, [0x5beac0]
mov dword [esp + 4], eax
call fcn.0042f8e0
mov eax, ebx
call fcn.0045a170
mov eax, edx
call fcn.0045a170
mov eax, esi
mov ecx, 0x100
call fcn.0045a180
nop
call fcn.00458ba0
jmp fcn.00502730