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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x502e74
sub esp, 0x48
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x68]
cmp eax, ecx
jl 0x502e5b
test eax, eax
je 0x502ddc
test ecx, ecx
je 0x502d1d
mov ebx, dword [esp + 0x54]
cmp ebx, eax
jl 0x502bc9
mov edx, eax
mov ebp, dword [esp + 0x4c]
jmp 0x502c37
cmp eax, 1
jne 0x502c06
lea eax, [0x6124c0]
mov dword [esp], eax
mov dword [esp + 4], 1
mov dword [esp + 8], 1
call fcn.004476a0
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x5c]
mov ebx, 1
mov ebp, eax
mov eax, 1
jmp 0x502c37
lea ecx, [0x6124c0]
mov dword [esp], ecx
mov dword [esp + 4], eax
lea ecx, [eax + 4]
mov dword [esp + 0x2c], ecx
mov dword [esp + 8], ecx
call fcn.004476a0
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x5c]
mov ebx, dword [esp + 0x2c]
mov ebp, eax
mov eax, edx
cmp ecx, ebx
ja 0x502e54
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x28], eax
mov dword [esp + 0x40], ebp
mov dword [esp], ebp
mov dword [esp + 4], ecx
mov dword [esp + 8], ebx
mov eax, dword [esp + 0x58]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], edx
mov eax, dword [esp + 0x60]
mov dword [esp + 0x14], eax
mov esi, dword [esp + 0x64]
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], ecx
mov esi, dword [esp + 0x6c]
mov dword [esp + 0x20], esi
call fcn.0050c740
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x68]
cmp ecx, edx
jle 0x502d06
mov ebx, dword [esp + 0x28]
cmp edx, ebx
ja 0x502e4b
mov ebp, dword [esp + 0x2c]
sub ebp, edx
mov dword [esp + 0x3c], ebp
mov edi, edx
shl edx, 2
xchg ebp, ebx
neg ebx
xchg ebp, ebx
sar ebp, 0x1f
and ebp, edx
mov esi, dword [esp + 0x40]
add ebp, esi
mov dword [esp], ebp
sub ebx, edi
mov dword [esp + 4], ebx
mov ebx, dword [esp + 0x3c]
mov dword [esp + 8], ebx
mov ebx, dword [esp + 0x60]
sub ebx, edi
mov dword [esp + 0x3c], ebx
neg ebx
sar ebx, 0x1f
and ebx, edx
mov edx, dword [esp + 0x58]
add edx, ebx
mov dword [esp + 0xc], edx
sub ecx, edi
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], eax
call fcn.0050c7b0
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x502e33
mov eax, dword [esp + 0x28]
mov ebx, dword [esp + 0x40]
mov ecx, eax
jmp 0x502dfa
mov ecx, dword [esp + 0x54]
cmp ecx, eax
jl 0x502d2d
mov edx, eax
mov ebx, dword [esp + 0x4c]
jmp 0x502d93
cmp eax, 1
jne 0x502d66
lea eax, [0x6124c0]
mov dword [esp], eax
mov dword [esp + 4], 1
mov dword [esp + 8], 1
call fcn.004476a0
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 0x5c]
mov ebx, eax
mov ecx, 1
mov eax, 1
jmp 0x502d93
lea ecx, [0x6124c0]
mov dword [esp], ecx
mov dword [esp + 4], eax
lea ecx, [eax + 4]
mov dword [esp + 0x30], ecx
mov dword [esp + 8], ecx
call fcn.004476a0
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 0x5c]
mov ebx, eax
mov ecx, dword [esp + 0x30]
mov eax, edx
cmp edx, eax
jl 0x502d99
mov edx, eax
mov ebp, dword [esp + 0x58]
cmp ebp, ebx
je 0x502dcc
mov dword [esp + 0x38], ecx
mov dword [esp + 0x34], eax
mov dword [esp + 0x44], ebx
mov dword [esp], ebx
mov dword [esp + 4], ebp
shl edx, 2
mov dword [esp + 8], edx
call fcn.0045ee00
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x38]
mov ebx, dword [esp + 0x44]
mov dword [esp + 0x70], ebx
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], ecx
add esp, 0x48
ret
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], 0
mov eax, dword [esp + 0x54]
mov dword [esp + 0x78], eax
add esp, 0x48
ret
mov eax, ebp
test eax, eax
jle 0x502e0d
lea ebp, [eax - 1]
cmp ecx, ebp
jbe 0x502e2c
mov esi, dword [ebx + eax*4 - 4]
test esi, esi
je 0x502df8
mov edx, dword [esp + 0x2c]
cmp eax, edx
ja 0x502e25
mov dword [esp + 0x70], ebx
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], edx
add esp, 0x48
ret
mov ecx, eax
call fcn.0045e570
mov eax, ebp
call fcn.0045e530
lea eax, [0x612980]
mov dword [esp], eax
lea eax, [0x69053c]
mov dword [esp + 4], eax
call fcn.00433710
mov eax, edx
mov ecx, ebx
call fcn.0045e590
mov edx, ebx
call fcn.0045e570
lea eax, [0x612980]
mov dword [esp], eax
lea eax, [0x69053c]
mov dword [esp + 4], eax
call fcn.00433710
nop
call fcn.0045d0a0
jmp fcn.00502b80