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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
lea eax, [esp - 0x20]
cmp eax, dword [ecx + 8]
jbe 0x502fd4
sub esp, 0xa0
mov ecx, dword [esp + 0xb4]
test ecx, ecx
je 0x502ad8
cmp ecx, 1
je 0x502a57
mov eax, dword [esp + 0xac]
test eax, eax
jle 0x50286a
mov ebx, dword [esp + 0xa4]
lea ebp, [ebx + eax*4 - 4]
mov edx, dword [esp + 0xb8]
mov esi, dword [esp + 0xb0]
lea edi, [esi + edx*4 - 4]
cmp edi, ebp
jne 0x50287f
xor eax, eax
xor ebx, ebx
jmp 0x50287f
mov edx, dword [esp + 0xb8]
mov esi, dword [esp + 0xb0]
mov ebx, dword [esp + 0xa4]
cmp dword [0x7ee110], ecx
jg 0x502978
mov ebp, dword [0x7ee114]
cmp ecx, ebp
jl 0x5028a5
nop
mov edi, ecx
xor ecx, ecx
mov dword [esp + 0x70], ecx
mov ecx, edi
jmp 0x502c07
mov ebp, ecx
shl ecx, 1
cmp eax, ecx
jl 0x5028b8
jae 0x502934
jmp 0x502bee
cmp ecx, 1
jne 0x5028f9
lea eax, [0x62ec80]
mov dword [esp], eax
mov dword [esp + 4], 1
mov dword [esp + 8], 1
call fcn.00447580
mov ebx, dword [esp + 0xc]
mov edx, dword [esp + 0xb8]
mov ebp, dword [esp + 0xb4]
mov eax, 1
mov ecx, 1
jmp 0x502934
mov dword [esp + 0x64], ecx
lea eax, [0x62ec80]
mov dword [esp], eax
mov dword [esp + 4], ecx
lea eax, [ecx + 4]
mov dword [esp + 0x44], eax
mov dword [esp + 8], eax
call fcn.00447580
mov ebx, dword [esp + 0xc]
mov edx, dword [esp + 0xb8]
mov ebp, dword [esp + 0xb4]
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x64]
mov dword [esp + 0x44], eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x84], ebx
mov dword [esp], ebx
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
mov esi, dword [esp + 0xb0]
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], ebp
mov dword [esp + 0x14], edx
call fcn.00502110
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x84]
mov edx, eax
jmp 0x502ba7
mov ebp, ecx
shl ecx, 1
cmp eax, ecx
jl 0x50298b
jae 0x502a07
jmp 0x502b9e
cmp ecx, 1
jne 0x5029cc
lea eax, [0x62ec80]
mov dword [esp], eax
mov dword [esp + 4], 1
mov dword [esp + 8], 1
call fcn.00447580
mov ebx, dword [esp + 0xc]
mov edx, dword [esp + 0xb8]
mov ebp, dword [esp + 0xb4]
mov ecx, 1
mov eax, 1
jmp 0x502a07
mov dword [esp + 0x68], ecx
lea eax, [0x62ec80]
mov dword [esp], eax
mov dword [esp + 4], ecx
lea eax, [ecx + 4]
mov dword [esp + 0x3c], eax
mov dword [esp + 8], eax
call fcn.00447580
mov ebx, dword [esp + 0xc]
mov edx, dword [esp + 0xb8]
mov ebp, dword [esp + 0xb4]
mov ecx, dword [esp + 0x68]
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x8c], ebx
mov dword [esp], ebx
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
mov esi, dword [esp + 0xb0]
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], ebp
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], edx
call fcn.005008c0
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x8c]
mov edx, eax
jmp 0x502b57
mov eax, dword [esp + 0xb0]
mov eax, dword [eax]
mov ecx, dword [esp + 0xac]
cmp ecx, 2
jl 0x502a75
mov edx, dword [esp + 0xa4]
jmp 0x502aa6
mov dword [esp + 0x78], eax
lea eax, [0x62ec80]
mov dword [esp], eax
mov dword [esp + 4], 2
mov dword [esp + 8], 6
call fcn.00447580
mov eax, dword [esp + 0xc]
mov edx, eax
mov ecx, 6
mov eax, dword [esp + 0x78]
mov dword [esp + 0x88], edx
mov dword [esp + 0x40], ecx
mov dword [esp], eax
mov dword [esp + 4], eax
call fcn.00509e70
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x88]
mov dword [edx + 4], eax
mov dword [edx], ecx
mov eax, 2
jmp 0x502b08
mov eax, dword [esp + 0xa4]
mov dword [esp + 0xbc], eax
mov dword [esp + 0xc0], 0
mov eax, dword [esp + 0xac]
mov dword [esp + 0xc4], eax
add esp, 0xa0
ret
mov eax, ebx
test eax, eax
jle 0x502b1c
lea ebx, [eax - 1]
cmp ebx, 2
jae 0x502b49
mov ebp, dword [edx + eax*4 - 4]
test ebp, ebp
je 0x502b06
mov ebx, dword [esp + 0x40]
cmp eax, ebx
ja 0x502b40
mov dword [esp + 0xbc], edx
mov dword [esp + 0xc0], eax
mov dword [esp + 0xc4], ebx
add esp, 0xa0
ret
mov ecx, eax
mov edx, ebx
call fcn.0045e7d0
mov eax, ebx
mov ecx, 2
call fcn.0045e790
mov eax, ebx
test eax, eax
jle 0x502b6a
lea ebx, [eax - 1]
cmp edx, ebx
jbe 0x502b95
mov ebp, dword [ecx + eax*4 - 4]
test ebp, ebp
je 0x502b55
mov edx, dword [esp + 0x3c]
cmp eax, edx
ja 0x502b8e
mov dword [esp + 0xbc], ecx
mov dword [esp + 0xc0], eax
mov dword [esp + 0xc4], edx
add esp, 0xa0
ret
mov ecx, eax
call fcn.0045e7d0
mov eax, ebx
mov ecx, edx
call fcn.0045e790
mov edx, eax
call fcn.0045e7d0
mov eax, ebx
test eax, eax
jle 0x502bba
lea ebx, [eax - 1]
cmp edx, ebx
jbe 0x502be5
mov ebp, dword [ecx + eax*4 - 4]
test ebp, ebp
je 0x502ba5
mov edx, dword [esp + 0x44]
cmp eax, edx
ja 0x502bde
mov dword [esp + 0xbc], ecx
mov dword [esp + 0xc0], eax
mov dword [esp + 0xc4], edx
add esp, 0xa0
ret
mov ecx, eax
call fcn.0045e7d0
mov eax, ebx
mov ecx, edx
call fcn.0045e790
mov edx, eax
call fcn.0045e7d0
sar ecx, 1
mov esi, dword [esp + 0x70]
inc esi
mov dword [esp + 0x70], esi
mov esi, dword [esp + 0xb0]
cmp ecx, ebp
jg 0x502bf5
mov dword [esp + 0x90], ebx
mov dword [esp + 0x6c], ecx
mov ebp, dword [esp + 0x70]
cmp ebp, 0x20
sbb esi, esi
mov ecx, ebp
mov ebx, dword [esp + 0x6c]
shl ebx, cl
and esi, ebx
cmp edx, esi
jb 0x502fcc
lea ebx, [esi + esi*2]
shl ebx, 1
mov ebp, edi
shl edi, 1
cmp edi, ebx
jl 0x502c40
mov ebx, edi
mov dword [esp + 0x48], esi
mov dword [esp + 0x50], edi
cmp ebx, eax
jg 0x502c5b
ja 0x502fc3
mov ecx, dword [esp + 0x90]
jmp 0x502cd5
cmp ebx, 1
jne 0x502c9b
lea eax, [0x62ec80]
mov dword [esp], eax
mov dword [esp + 4], 1
mov dword [esp + 8], 1
call fcn.00447580
mov ebx, dword [esp + 0xc]
mov edx, dword [esp + 0xb8]
mov esi, dword [esp + 0x48]
mov eax, 1
mov ecx, ebx
mov ebx, 1
jmp 0x502cd5
mov dword [esp + 0x4c], ebx
lea eax, [0x62ec80]
mov dword [esp], eax
mov dword [esp + 4], ebx
lea eax, [ebx + 4]
mov dword [esp + 0x38], eax
mov dword [esp + 8], eax
call fcn.00447580
mov ebx, dword [esp + 0xc]
mov edx, dword [esp + 0xb8]
mov esi, dword [esp + 0x48]
mov eax, dword [esp + 0x38]
mov ecx, ebx
mov ebx, dword [esp + 0x4c]
mov dword [esp + 0x80], ecx
mov dword [esp + 0x38], eax
mov dword [esp], ecx
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
mov ebx, dword [esp + 0xb0]
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edx
call fcn.005023e0
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x50]
cmp edx, ecx
jb 0x502fbe
mov eax, dword [esp + 0x48]
mov ebx, eax
shl eax, 1
cmp eax, ecx
ja 0x502fb9
mov dword [esp + 0x7c], eax
sub edx, eax
mov esi, edx
neg edx
shl ebx, 3
sar edx, 0x1f
and ebx, edx
mov edx, dword [esp + 0x80]
add ebx, edx
mov dword [esp], ebx
sub ecx, eax
mov dword [esp + 4], ecx
mov dword [esp + 8], esi
call fcn.004fff20
mov eax, dword [esp + 0xb4]
mov ecx, dword [esp + 0x48]
cmp eax, ecx
jle 0x502f4f
mov eax, dword [esp + 0x7c]
mov dword [esp], eax
call fcn.00502fe0
mov eax, dword [esp + 4]
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov ebx, dword [eax + 8]
mov dword [esp + 0x60], ebx
nop
mov ebp, dword [esp + 0xb0]
mov esi, dword [esp + 0x48]
mov edi, esi
jmp 0x502d95
mov esi, ebx
mov ebx, dword [esp + 0x60]
test esi, esi
jle 0x502db8
lea ebx, [esi - 1]
cmp edi, ebx
jbe 0x502fb0
mov dword [esp + 0x74], esi
mov esi, dword [ebp + esi*4 - 4]
test esi, esi
je 0x502d8f
mov ebx, dword [esp + 0x60]
mov esi, dword [esp + 0x74]
mov dword [esp + 0x98], eax
mov eax, dword [esp + 0xb8]
cmp eax, esi
jb 0x502fa7
mov dword [esp], ecx
mov dword [esp + 4], edx
mov dword [esp + 8], ebx
mov dword [esp + 0xc], ebp
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], eax
sub eax, edi
mov dword [esp + 0x58], eax
mov ecx, eax
neg eax
mov edx, edi
shl edi, 2
sar eax, 0x1f
and edi, eax
lea eax, [ebp + edi]
mov dword [esp + 0x94], eax
mov dword [esp + 0x18], eax
mov ebx, dword [esp + 0xb4]
sub ebx, edx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ecx
call fcn.00501760
mov eax, dword [esp + 0x24]
mov dword [esp + 0x9c], eax
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x60], ecx
mov edx, dword [esp + 0x28]
mov dword [esp + 0x5c], edx
mov ebx, dword [esp + 0x80]
mov dword [esp], ebx
mov ebp, dword [esp + 0x50]
mov dword [esp + 4], ebp
mov esi, dword [esp + 0x38]
mov dword [esp + 8], esi
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], ecx
mov edi, dword [esp + 0x48]
mov dword [esp + 0x18], edi
call fcn.00501650
mov eax, dword [esp + 0x80]
mov dword [esp], eax
mov ecx, dword [esp + 0x50]
mov dword [esp + 4], ecx
mov edx, dword [esp + 0x38]
mov dword [esp + 8], edx
mov ebx, dword [esp + 0x9c]
mov dword [esp + 0xc], ebx
mov ebp, dword [esp + 0x5c]
mov dword [esp + 0x10], ebp
mov esi, dword [esp + 0x60]
mov dword [esp + 0x14], esi
mov edi, dword [esp + 0x48]
mov dword [esp + 0x18], edi
call fcn.00501650
mov eax, dword [esp + 0x9c]
mov dword [esp], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x60]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x94]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 0x14], eax
call fcn.00502800
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov ebx, dword [esp + 0x80]
mov dword [esp], ebx
mov ebp, dword [esp + 0x50]
mov dword [esp + 4], ebp
mov esi, dword [esp + 0x38]
mov dword [esp + 8], esi
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], edx
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x18], eax
call fcn.00501650
nop
lea eax, [0x825840]
mov dword [esp], eax
lea eax, [0x65ec60]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x98]
mov dword [esp + 8], eax
call fcn.00465b90
mov edi, dword [esp + 0x50]
mov ebx, dword [esp + 0x80]
mov eax, edi
jmp 0x502f60
mov edi, ebp
test edi, edi
jle 0x502f73
lea ebp, [edi - 1]
cmp eax, ebp
jbe 0x502f9e
mov esi, dword [ebx + edi*4 - 4]
test esi, esi
je 0x502f5e
mov edx, dword [esp + 0x38]
cmp edi, edx
ja 0x502f97
mov dword [esp + 0xbc], ebx
mov dword [esp + 0xc0], edi
mov dword [esp + 0xc4], edx
add esp, 0xa0
ret
mov ecx, edi
call fcn.0045e7d0
mov ecx, eax
mov eax, ebp
call fcn.0045e790
mov ecx, esi
mov edx, eax
call fcn.0045e7d0
mov eax, ebx
mov ecx, edi
call fcn.0045e790
call fcn.0045e7f0
call fcn.0045e7d0
mov ecx, ebx
mov edx, eax
call fcn.0045e7d0
mov ecx, esi
call fcn.0045e7d0
nop
call fcn.0045d2d0
jmp fcn.00502800