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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
lea eax, [esp - 0xa4]
cmp eax, dword [ecx + 8]
jbe 0x509ad7
sub esp, 0x124
mov dword [esp + 0x140], 0
mov dword [esp + 0x144], 0
mov dword [esp + 0x148], 0
mov dword [esp + 0x14c], 0
mov dword [esp + 0x150], 0
mov eax, dword [esp + 0x138]
mov eax, dword [eax]
test eax, eax
je 0x509abe
mov ecx, dword [eax + 8]
lea edx, [0x9244f0]
test ecx, ecx
je 0x509a71
mov dword [esp + 0x54], ecx
mov dword [esp + 0x50], eax
mov dword [esp + 0x30], edx
mov ecx, dword [edx + 0x10]
mov dword [esp], eax
call ecx
mov eax, dword [esp + 0x50]
mov dword [esp + 8], eax
mov dword [esp], 4
mov eax, dword [esp + 0x30]
add eax, 0x14
mov dword [esp + 4], eax
call fcn.00426b30
test eax, eax
jne 0x509a64
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], 0
mov ecx, dword [esp + 0x54]
mov edx, dword [ecx]
cmp edx, 1
jg 0x50964c
lea edi, [esp + 0xf4]
xor eax, eax
call fcn.0044c954
lea ecx, [0x80e1a0]
mov dword [esp], ecx
mov ecx, dword [esp + 0x54]
mov dword [esp + 4], ecx
lea ecx, [esp + 0xf4]
mov dword [esp + 8], ecx
call fcn.0040b900
mov ecx, dword [esp + 0x12c]
mov edx, dword [esp + 0x130]
mov ebx, dword [esp + 0x134]
jmp 0x50936b
mov dword [esp + 0x134], eax
mov dword [esp + 0x12c], ecx
mov dword [esp + 0x130], edx
lea ebx, [esp + 0xf4]
mov dword [esp], ebx
call fcn.0040bb80
mov eax, dword [esp + 0x12c]
mov ecx, dword [esp + 0x130]
mov edx, dword [esp + 0x134]
mov ebx, edx
mov edx, ecx
mov ecx, eax
mov eax, dword [esp + 0xf4]
test eax, eax
je 0x509614
mov dword [esp + 0x130], edx
mov dword [esp + 0x12c], ecx
mov esi, dword [esp + 0xf8]
lea edi, [esp + 0xac]
call fcn.0044ce34
mov eax, dword [esp + 0xf4]
test byte [eax], al
lea edi, [esp + 0x94]
lea esi, [esp + 0xac]
call fcn.0044ce34
mov eax, dword [esp + 0x98]
test eax, eax
je 0x5093d1
mov eax, dword [esp + 0x94]
test eax, eax
jne 0x509486
mov eax, dword [esp + 0xa4]
lea ecx, [eax + edx]
mov dword [esp + 0x4c], ecx
mov ebp, dword [esp + 0xa0]
cmp ecx, ebx
ja 0x509439
mov esi, dword [esp + 0x12c]
test ecx, ecx
jl 0x509ad0
cmp ecx, ebx
ja 0x509ad0
mov dword [esp + 0x12c], esi
mov dword [esp + 0x134], ebx
lea ecx, [esi + edx]
mov dword [esp], ecx
mov dword [esp + 4], ebp
mov dword [esp + 8], eax
call fcn.0044d060
mov eax, dword [esp + 0x134]
mov ecx, dword [esp + 0x12c]
mov edx, dword [esp + 0x4c]
jmp 0x50932c
mov dword [esp + 0x48], eax
mov dword [esp + 0x70], ebp
lea eax, [0x80a6a0]
mov dword [esp], eax
mov ebp, dword [esp + 0x12c]
mov dword [esp + 4], ebp
mov dword [esp + 8], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], ecx
call fcn.00438c30
mov esi, dword [esp + 0x14]
mov ebx, dword [esp + 0x1c]
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x130]
mov ebp, dword [esp + 0x70]
jmp 0x5093f1
mov dword [esp + 0x44], ebx
mov eax, dword [esp + 0x128]
mov dword [esp], eax
mov ecx, dword [esp + 0x94]
mov dword [esp + 4], ecx
call fcn.004f9e10
mov eax, dword [esp + 8]
mov dword [esp + 0x64], eax
lea ecx, [0x809c60]
mov dword [esp], ecx
call fcn.00409d90
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0x9c]
mov edx, dword [esp + 0x98]
mov dword [eax], edx
mov edx, dword [0xc6f140]
test edx, edx
jne 0x509601
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x64]
movzx ebx, byte [ecx + 0x14]
movzx ebp, byte [ecx + 0x15]
test bl, bl
je 0x5095f9
mov ebx, dword [0xc1a0f4]
add eax, ebx
xchg ebp, eax
test al, al
xchg ebp, eax
je 0x509503
mov eax, dword [eax]
mov edx, dword [ecx + 0x10]
mov ebx, dword [ecx + 4]
mov ecx, dword [ecx]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], ebx
mov ecx, dword [esp + 0x12c]
mov dword [esp], ecx
mov ecx, dword [esp + 0x130]
mov dword [esp + 4], ecx
mov ecx, dword [esp + 0x44]
mov dword [esp + 8], ecx
mov dword [esp + 0xc], eax
movzx eax, byte [esp + 0x13c]
mov byte [esp + 0x18], al
mov ecx, dword [edx]
call ecx
mov eax, dword [esp + 0x24]
mov dword [esp + 0x134], eax
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x5c], ecx
mov ebx, dword [esp + 0x28]
mov dword [esp + 0x40], ebx
mov ebp, dword [esp + 0x20]
mov dword [esp + 0x130], ebp
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x12c], esi
lea edi, [esp + 0x74]
mov dword [esp], edi
mov dword [esp + 4], ebx
mov dword [esp + 8], ecx
call fcn.004f25b0
movzx eax, byte [esp + 0xc]
test al, al
je 0x5095ac
mov eax, dword [esp + 0x134]
mov ecx, dword [esp + 0x12c]
mov edx, dword [esp + 0x130]
jmp 0x50932c
mov eax, dword [esp + 0x12c]
mov dword [esp + 0x140], eax
mov eax, dword [esp + 0x130]
mov dword [esp + 0x144], eax
mov eax, dword [esp + 0x134]
mov dword [esp + 0x148], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0x14c], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x150], eax
nop
call fcn.004272f0
add esp, 0x124
ret
mov eax, dword [eax + 4]
jmp 0x5094fb
lea edi, [eax + 4]
mov edx, eax
mov eax, ecx
call fcn.0044c860
mov eax, edx
jmp 0x5094df
mov dword [esp + 0x140], ecx
mov dword [esp + 0x144], edx
mov dword [esp + 0x148], ebx
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x74]
mov dword [esp + 0x14c], ecx
mov dword [esp + 0x150], eax
nop
call fcn.004272f0
add esp, 0x124
ret
lea eax, [0x809b20]
mov dword [esp], eax
mov dword [esp + 4], 0
mov dword [esp + 8], edx
call fcn.00438ab0
mov eax, dword [esp + 0x14]
mov dword [esp + 0x38], eax
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x34], ecx
mov edx, dword [esp + 0xc]
mov dword [esp + 0x58], edx
lea edi, [esp + 0xc4]
xor eax, eax
call fcn.0044c954
lea eax, [0x80e1a0]
mov dword [esp], eax
mov ecx, dword [esp + 0x54]
mov dword [esp + 4], ecx
lea ebp, [esp + 0xc4]
mov dword [esp + 8], ebp
call fcn.0040b900
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x34]
jmp 0x5096e5
mov dword [esp + 0x58], ecx
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], eax
mov dword [ecx + edx*4], ebx
lea edx, [esp + 0xc4]
mov dword [esp], edx
call fcn.0040bb80
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x34]
mov dword [esp + 0x34], edx
mov ebx, dword [esp + 0xc4]
test ebx, ebx
je 0x50973a
mov ebx, dword [ebx]
lea ebp, [edx + 1]
cmp ebp, eax
jle 0x5096bb
mov dword [esp + 0x3c], ebx
lea ebx, [0x809b20]
mov dword [esp], ebx
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], ebp
call fcn.00438c30
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
lea ebp, [eax + 1]
mov ebx, dword [esp + 0x3c]
mov eax, edx
mov edx, dword [esp + 0x34]
jmp 0x5096bb
mov dword [esp + 0x6c], ecx
mov dword [esp], ecx
mov dword [esp + 4], edx
mov dword [esp + 8], eax
call fcn.004bd570
xor eax, eax
mov ecx, dword [esp + 0x134]
mov edx, dword [esp + 0x130]
mov ebx, dword [esp + 0x12c]
jmp 0x509776
mov ebp, dword [esp + 0x4c]
inc ebp
mov ebx, eax
mov eax, ebp
mov esi, ecx
mov ecx, edx
mov edx, esi
mov ebp, dword [esp + 0x34]
cmp eax, ebp
jge 0x509a2c
mov dword [esp + 0x134], ecx
mov dword [esp + 0x130], edx
mov dword [esp + 0x12c], ebx
mov dword [esp + 0x4c], eax
mov ecx, dword [esp + 0x6c]
mov edx, dword [ecx + eax*4]
lea ebx, [0x80e1a0]
mov dword [esp], ebx
mov ebp, dword [esp + 0x54]
mov dword [esp + 4], ebp
mov dword [esp + 8], edx
call fcn.0040cc60
mov esi, dword [esp + 0xc]
lea edi, [esp + 0x7c]
call fcn.0044ce34
mov eax, dword [esp + 0x80]
test eax, eax
je 0x5097e0
mov eax, dword [esp + 0x7c]
test eax, eax
jne 0x5098a2
mov eax, dword [esp + 0x8c]
mov ecx, dword [esp + 0x130]
lea edx, [eax + ecx]
mov dword [esp + 0x48], edx
mov ebx, dword [esp + 0x88]
mov ebp, dword [esp + 0x134]
cmp edx, ebp
ja 0x509855
mov esi, dword [esp + 0x12c]
test edx, edx
jl 0x509ac9
cmp edx, ebp
ja 0x509ac9
mov dword [esp + 0x12c], esi
mov dword [esp + 0x134], ebp
add ecx, esi
mov dword [esp], ecx
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
call fcn.0044d060
mov eax, dword [esp + 0x12c]
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x134]
jmp 0x509767
mov dword [esp + 0x44], eax
mov dword [esp + 0x68], ebx
lea eax, [0x80a6a0]
mov dword [esp], eax
mov ebx, dword [esp + 0x12c]
mov dword [esp + 4], ebx
mov dword [esp + 8], ecx
mov dword [esp + 0xc], ebp
mov dword [esp + 0x10], edx
call fcn.00438c30
mov ebp, dword [esp + 0x1c]
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x130]
mov edx, dword [esp + 0x48]
mov ebx, dword [esp + 0x68]
jmp 0x50980e
mov eax, dword [esp + 0x128]
mov dword [esp], eax
mov ecx, dword [esp + 0x7c]
mov dword [esp + 4], ecx
call fcn.004f9e10
mov eax, dword [esp + 8]
mov dword [esp + 0x60], eax
lea ecx, [0x809c60]
mov dword [esp], ecx
call fcn.00409d90
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0x84]
mov edx, dword [esp + 0x80]
mov dword [eax], edx
mov edx, dword [0xc6f140]
test edx, edx
jne 0x509a19
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x60]
movzx ebx, byte [ecx + 0x14]
movzx ebp, byte [ecx + 0x15]
test bl, bl
je 0x509a11
mov ebx, dword [0xc1a0f4]
add eax, ebx
xchg ebp, eax
test al, al
xchg ebp, eax
je 0x509918
mov eax, dword [eax]
mov edx, dword [ecx + 0x10]
mov ebx, dword [ecx + 4]
mov ecx, dword [ecx]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], ebx
mov ecx, dword [esp + 0x12c]
mov dword [esp], ecx
mov ecx, dword [esp + 0x130]
mov dword [esp + 4], ecx
mov ecx, dword [esp + 0x134]
mov dword [esp + 8], ecx
mov dword [esp + 0xc], eax
movzx eax, byte [esp + 0x13c]
mov byte [esp + 0x18], al
mov ecx, dword [edx]
call ecx
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x5c], eax
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x40], ecx
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x134], ebx
mov ebp, dword [esp + 0x20]
mov dword [esp + 0x130], ebp
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x12c], esi
lea edi, [esp + 0x74]
mov dword [esp], edi
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
call fcn.004f25b0
movzx eax, byte [esp + 0xc]
test al, al
je 0x5099c4
mov eax, dword [esp + 0x12c]
mov ecx, dword [esp + 0x130]
mov edx, dword [esp + 0x134]
jmp 0x509767
mov eax, dword [esp + 0x12c]
mov dword [esp + 0x140], eax
mov eax, dword [esp + 0x130]
mov dword [esp + 0x144], eax
mov eax, dword [esp + 0x134]
mov dword [esp + 0x148], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0x14c], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x150], eax
nop
call fcn.004272f0
add esp, 0x124
ret
mov eax, dword [eax + 4]
jmp 0x509910
lea edi, [eax + 4]
mov edx, eax
mov eax, ecx
call fcn.0044c860
mov eax, edx
jmp 0x5098f4
mov dword [esp + 0x140], ebx
mov dword [esp + 0x144], edx
mov dword [esp + 0x148], ecx
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x74]
mov dword [esp + 0x14c], ecx
mov dword [esp + 0x150], eax
nop
call fcn.004272f0
add esp, 0x124
ret
nop
call fcn.004272f0
add esp, 0x124
ret
mov eax, dword [esp + 0x12c]
mov dword [esp + 0x140], eax
mov eax, dword [esp + 0x130]
mov dword [esp + 0x144], eax
mov eax, dword [esp + 0x134]
mov dword [esp + 0x148], eax
mov dword [esp + 0x14c], 0
mov dword [esp + 0x150], 0
nop
call fcn.004272f0
add esp, 0x124
ret
xor ecx, ecx
xor eax, eax
xor edx, edx
jmp 0x509284
call fcn.00426870
ud2
call fcn.00426870
ud2
call fcn.0044b100
jmp fcn.00509210