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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x503472
sub esp, 0x60
mov eax, dword [0x67e110]
test eax, eax
je 0x503431
mov ecx, dword [esp + 0x64]
cmp ecx, eax
jle 0x503431
mov edx, 1
jmp 0x502f6f
shl eax, 1
inc edx
mov ecx, ebx
mov ebx, ecx
sar ecx, 1
cmp eax, ecx
jge 0x502f7c
cmp edx, 0x40
jl 0x502f6a
mov dword [esp + 0x38], edx
mov eax, dword [esp + 0x68]
cmp eax, 0xa
jne 0x50340c
lea eax, [0x780b20]
mov dword [esp], eax
call fcn.0046edf0
mov ecx, dword [esp + 0x38]
cmp ecx, 0x40
ja 0x503467
lea eax, [0x780b28]
mov edx, 0x40
lea ebx, [ecx - 1]
cmp ebx, ecx
jae 0x503460
mov dword [esp + 0x48], edx
mov dword [esp + 0x58], eax
lea ebx, [ecx + ecx*4]
mov ebx, dword [eax + ebx*4 - 4]
test ebx, ebx
jne 0x503403
xor ebx, ebx
jmp 0x502fda
inc ebx
cmp ebx, ecx
jge 0x5033ce
cmp ebx, ecx
jae 0x503459
lea ebp, [ebx + ebx*4]
mov esi, dword [eax + ebp*4 + 0x10]
test esi, esi
jne 0x502fd9
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x44], ebp
test ebx, ebx
jne 0x503350
mov dword [esp], 0
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov eax, dword [esp + 0x70]
mov dword [esp + 0xc], eax
mov ecx, dword [0x67e110]
mov dword [esp + 0x10], ecx
call fcn.00502e30
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov edi, dword [esp + 0x58]
mov dword [edi + 4], ecx
mov dword [edi + 8], edx
mov ecx, dword [0x795b00]
test ecx, ecx
jne 0x503346
mov dword [edi], eax
mov eax, dword [0x67e110]
mov ecx, dword [esp + 0x6c]
imul eax, ecx
mov dword [edi + 0x10], eax
mov eax, dword [esp + 0x44]
mov edx, dword [edi + eax*4 + 4]
mov ebx, dword [edi + eax*4]
lea ebp, [edi + eax*4]
mov dword [esp + 0x5c], ebp
test edx, edx
jg 0x503294
mov esi, edx
xor edx, edx
mov dword [esp + 0x50], edx
xor edx, edx
mov dword [esp + 0x34], edx
mov edx, esi
cmp esi, edx
jge 0x50328d
mov dword [esp + 0x24], edx
mov ecx, dword [esp + 0x50]
cmp ebx, ecx
je 0x5030c0
mov dword [esp], ecx
mov dword [esp + 4], ebx
shl esi, 2
mov dword [esp + 8], esi
call fcn.0045aa60
jmp 0x5030c0
inc dword [ebx + ecx*4 + 0x10]
mov eax, dword [esp + 0x50]
mov dword [esp], eax
mov ecx, dword [esp + 0x24]
mov dword [esp + 4], ecx
mov edx, dword [esp + 0x34]
mov dword [esp + 8], edx
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], edx
mov ebx, dword [esp + 0x68]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], 0
call fcn.005036f0
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x50320a
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x58]
mov ebx, dword [edx + ecx*4 + 8]
mov ebp, dword [edx + ecx*4]
mov esi, dword [esp + 0x24]
cmp ebx, esi
jl 0x503190
mov eax, esi
cmp esi, eax
jle 0x50318a
mov edi, eax
mov dword [esp + 0x40], esi
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x2c], ebx
mov ebx, dword [esp + 0x50]
cmp ebp, ebx
je 0x50314a
mov dword [esp], ebp
mov dword [esp + 4], ebx
shl eax, 2
mov dword [esp + 8], eax
call fcn.0045aa60
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x40]
mov ebx, dword [esp + 0x58]
mov dword [ebx + ecx*4 + 4], edx
mov edx, dword [esp + 0x2c]
mov dword [ebx + ecx*4 + 8], edx
mov edx, dword [0x795b00]
test edx, edx
jne 0x503178
mov eax, dword [esp + 0x4c]
mov dword [ebx + ecx*4], eax
jmp 0x5030bc
mov edi, dword [esp + 0x5c]
mov eax, dword [esp + 0x4c]
call fcn.0045a0f0
jmp 0x5030bc
mov edi, eax
mov eax, esi
jmp 0x503123
cmp esi, 1
jne 0x5031d2
lea eax, [0x5507c0]
mov dword [esp], eax
mov dword [esp + 4], 1
mov dword [esp + 8], 1
call fcn.00441b50
mov ebp, dword [esp + 0xc]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x58]
mov esi, 1
mov ebx, 1
jmp 0x50311d
lea eax, [0x5507c0]
mov dword [esp], eax
mov dword [esp + 4], esi
lea ecx, [esi + 4]
mov dword [esp + 0x2c], ecx
mov dword [esp + 8], ecx
call fcn.00441b50
mov ebp, dword [esp + 0xc]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x58]
mov esi, eax
mov ebx, dword [esp + 0x2c]
jmp 0x50311d
mov edx, dword [esp + 0x44]
mov ebx, dword [esp + 0x58]
mov ebp, dword [ebx + edx*4 + 4]
mov esi, dword [ebx + edx*4]
lea edi, [ebp - 1]
test edi, edi
jl 0x503281
mov ebp, dword [esi + ebp*4 - 4]
nop
cmp ebp, 0x10000
jb 0x50327d
shr ebp, 0x10
mov eax, 0x10
cmp ebp, 0x100
jb 0x503279
shr ebp, 8
lea esi, [eax + 8]
cmp ebp, 0x100
jae 0x50344d
shl edi, 5
mov eax, edx
lea edx, [0x683bc0]
movzx ebp, byte [edx + ebp]
add ebp, esi
add ebp, edi
mov dword [ebx + eax*4 + 0xc], ebp
mov eax, ebx
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x48]
mov ebx, dword [esp + 0x3c]
jmp 0x502fd9
mov esi, eax
jmp 0x503243
xor eax, eax
jmp 0x503235
mov eax, edx
lea edx, [0x683bc0]
xor ebp, ebp
jmp 0x503262
mov esi, edx
jmp 0x50309b
mov dword [esp + 0x28], edx
mov dword [esp + 0x54], ebx
cmp edx, 1
jne 0x5032f6
lea eax, [0x5507c0]
mov dword [esp], eax
mov dword [esp + 4], 1
mov dword [esp + 8], 1
call fcn.00441b50
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x6c]
mov ebx, dword [esp + 0x54]
mov ebp, dword [esp + 0x5c]
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x58]
mov edx, 1
mov dword [esp + 0x50], eax
mov ecx, 1
mov dword [esp + 0x34], ecx
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x6c]
jmp 0x503093
lea eax, [0x5507c0]
mov dword [esp], eax
mov dword [esp + 4], edx
lea ecx, [edx + 4]
mov dword [esp + 0x30], ecx
mov dword [esp + 8], ecx
call fcn.00441b50
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x6c]
mov ebx, dword [esp + 0x54]
mov ebp, dword [esp + 0x5c]
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x58]
mov edx, esi
mov dword [esp + 0x50], eax
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x34], ecx
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x6c]
jmp 0x503093
call fcn.0045a0f0
jmp 0x503059
mov ecx, dword [eax + ebp*4 - 0x14]
mov edx, dword [eax + ebp*4 - 0x10]
mov ebx, dword [eax + ebp*4 - 0xc]
mov dword [esp], 0
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], ebx
call fcn.004fce30
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov ebx, dword [esp + 0x44]
mov ebp, dword [esp + 0x58]
mov dword [ebp + ebx*4 + 4], ecx
mov dword [ebp + ebx*4 + 8], edx
lea edi, [ebp + ebx*4]
mov ecx, dword [0x795b00]
test ecx, ecx
jne 0x5033c7
mov dword [ebp + ebx*4], eax
mov eax, dword [ebp + ebx*4 - 4]
shl eax, 1
mov dword [ebp + ebx*4 + 0x10], eax
mov ecx, dword [esp + 0x6c]
mov edi, ebp
jmp 0x503069
call fcn.0045a0f0
jmp 0x5033b2
mov ebx, dword [esp + 0x68]
cmp ebx, 0xa
je 0x5033e7
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], ecx
mov dword [esp + 0x7c], edx
add esp, 0x60
ret
lea eax, [0x780b20]
mov dword [esp], eax
call fcn.0046f1b0
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x48]
jmp 0x5033d7
mov ebx, dword [esp + 0x68]
cmp ebx, 0xa
jmp 0x5033d5
lea eax, [0x55f2c0]
mov dword [esp], eax
mov dword [esp + 4], edx
mov dword [esp + 8], edx
call fcn.00441b50
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x38]
mov edx, ecx
jmp 0x502fb3
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 0
add esp, 0x60
ret
mov eax, ebp
mov ecx, 0x100
call fcn.0045a180
mov eax, ebx
call fcn.0045a170
mov eax, ebx
call fcn.0045a170
mov edx, 0x40
call fcn.0045a190
nop
call fcn.00458ba0
jmp fcn.00502f30