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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
lea eax, [esp - 0x48]
cmp eax, dword [ecx + 8]
jbe 0x50a8a6
sub esp, 0xc8
mov eax, dword [esp + 0x128]
test eax, eax
je 0x509d0f
mov ecx, dword [eax]
jmp 0x509d11
xor ecx, ecx
mov dword [esp + 0x50], ecx
lea eax, [0x606f80]
mov dword [esp], eax
mov dword [esp + 4], 0
mov dword [esp + 8], ecx
call fcn.004475c0
mov eax, dword [esp + 0xc]
mov dword [esp + 0x8c], eax
mov dword [esp + 0x90], 0
mov eax, dword [esp + 0x50]
mov dword [esp + 0x94], eax
lea edi, [esp + 0x98]
xor eax, eax
call fcn.0045eb74
lea eax, [0x6082c0]
mov dword [esp], eax
mov ecx, dword [esp + 0x128]
mov dword [esp + 4], ecx
lea edx, [esp + 0x98]
mov dword [esp + 8], edx
call fcn.0040d0a0
jmp 0x509d93
lea eax, [esp + 0x98]
mov dword [esp], eax
call fcn.0040d300
mov ecx, dword [esp + 0x98]
test ecx, ecx
je 0x509f79
mov edx, dword [ecx + 4]
mov dword [esp + 0x40], edx
mov eax, dword [ecx]
mov dword [esp + 0x64], eax
mov ecx, dword [esp + 0xf8]
mov dword [esp + 0x78], ecx
mov ebx, dword [esp + 0xfc]
mov dword [esp + 0x50], ebx
xor ebp, ebp
jmp 0x50a85b
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x50]
cmp ecx, edx
mov eax, dword [esp + 0x64]
mov edx, dword [esp + 0x40]
jl 0x509d84
mov ecx, dword [0x7ba970]
lea ebx, [0x7ba970]
cmp dword [ebx + 4], edx
jne 0x509e1c
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
call fcn.004025c0
movzx eax, byte [esp + 0xc]
test al, al
jne 0x509d84
mov eax, dword [esp + 0x64]
mov edx, dword [esp + 0x40]
lea ebx, [0x7ba970]
mov ecx, dword [0x7ba9a8]
lea ebp, [0x7ba9a8]
cmp dword [ebp + 4], edx
jne 0x509e5e
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
call fcn.004025c0
movzx eax, byte [esp + 0xc]
test al, al
jne 0x509d84
mov eax, dword [esp + 0x64]
mov edx, dword [esp + 0x40]
lea ebx, [0x7ba970]
lea ebp, [0x7ba9a8]
mov ecx, dword [0x7ba998]
lea esi, [0x7ba998]
cmp dword [esi + 4], edx
jne 0x509ea6
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
call fcn.004025c0
movzx eax, byte [esp + 0xc]
test al, al
jne 0x509d84
mov eax, dword [esp + 0x64]
mov edx, dword [esp + 0x40]
lea ebx, [0x7ba970]
lea ebp, [0x7ba9a8]
lea esi, [0x7ba998]
mov ecx, dword [0x7ba940]
lea esi, [0x7ba940]
cmp dword [esi + 4], edx
jne 0x509eee
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
call fcn.004025c0
movzx eax, byte [esp + 0xc]
test al, al
jne 0x509d84
mov eax, dword [esp + 0x64]
mov edx, dword [esp + 0x40]
lea ebx, [0x7ba970]
lea ebp, [0x7ba9a8]
lea esi, [0x7ba940]
mov ecx, dword [esp + 0x90]
lea esi, [ecx + 1]
mov ebp, dword [esp + 0x8c]
mov ebx, dword [esp + 0x94]
cmp ebx, esi
jae 0x509f4a
lea eax, [0x606f80]
mov dword [esp], eax
mov dword [esp + 4], ebp
mov dword [esp + 8], ecx
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], esi
call fcn.00447740
mov ebp, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x94], eax
mov dword [esp + 0x8c], ebp
mov eax, dword [esp + 0x64]
mov edx, dword [esp + 0x40]
lea ebx, [ecx + 1]
mov dword [esp + 0x90], ebx
lea ebx, [ebp + ecx*8 + 4]
mov dword [ebx], edx
mov edx, dword [0x7e77b0]
lea edi, [ebp + ecx*8]
test edx, edx
jne 0x509f6f
mov dword [edi], eax
jmp 0x509d84
call fcn.0045e950
jmp 0x509d84
mov eax, dword [esp + 0x8c]
mov ecx, dword [esp + 0x90]
mov edx, dword [esp + 0x94]
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
call fcn.00408e80
mov eax, dword [esp + 0xc]
lea ecx, [0x68c098]
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.00488b60
mov eax, dword [esp + 0x12c]
mov ecx, dword [eax + 4]
sub ecx, dword [eax + 0xc]
test ecx, ecx
jle 0x509fdd
mov ecx, dword [esp + 0x90]
test ecx, ecx
je 0x509fdd
mov dword [esp], eax
mov byte [esp + 4], 0x20
call fcn.0049cf10
mov eax, dword [esp + 0x90]
mov dword [esp + 0x84], 0
mov dword [esp + 0x88], 0
lea ecx, [0x50a8b0]
mov dword [esp + 0x84], ecx
lea ecx, [esp + 0x8c]
mov dword [esp + 0x88], ecx
mov dword [esp], eax
lea eax, [esp + 0x84]
mov dword [esp + 4], eax
call fcn.00488020
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0x90]
mov edx, dword [esp + 0x8c]
cmp ecx, eax
jle 0x50a07f
jbe 0x50a853
lea edx, [edx + eax*8]
mov ebx, dword [edx + 4]
mov edx, dword [edx]
mov ebp, dword [0x7ba948]
cmp dword [0x7ba94c], ebx
je 0x50a05e
xor ecx, ecx
jmp 0x50a081
mov dword [esp + 0x48], eax
mov dword [esp], edx
mov dword [esp + 4], ebp
mov dword [esp + 8], ebx
call fcn.004025c0
movzx eax, byte [esp + 0xc]
mov ecx, eax
mov eax, dword [esp + 0x48]
jmp 0x50a081
xor ecx, ecx
test cl, cl
je 0x50a1fd
mov edx, dword [esp + 0x8c]
mov ecx, dword [esp + 0x90]
cmp ecx, eax
jbe 0x50a84e
lea ecx, [edx + eax*8 + 4]
mov dword [ecx], 0
lea edi, [edx + eax*8]
mov ecx, dword [0x7e77b0]
test ecx, ecx
jne 0x50a0be
mov dword [edi], 0
jmp 0x50a0c5
xor eax, eax
call fcn.0045e950
lea eax, [0x603500]
mov dword [esp], eax
call fcn.0040b440
mov edi, dword [esp + 4]
mov eax, dword [0x7ba948]
mov ecx, dword [0x7ba94c]
mov dword [edi + 4], ecx
mov ecx, dword [0x7e77b0]
test ecx, ecx
jne 0x50a0f4
mov dword [edi], eax
jmp 0x50a0f9
call fcn.0045e950
mov edx, dword [esp + 0x90]
lea ecx, [edx + 1]
mov dword [esp + 0x2c], ecx
cmp ecx, 1
ja 0x50a113
mov eax, 1
jmp 0x50a150
mov dword [esp + 0x50], edx
lea eax, [0x606f80]
mov dword [esp], eax
mov dword [esp + 4], edi
mov dword [esp + 8], 1
mov dword [esp + 0xc], 1
mov dword [esp + 0x10], ecx
call fcn.00447740
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x2c]
cmp ecx, 1
mov edx, dword [esp + 0x50]
jb 0x50a844
mov dword [esp + 0x50], eax
mov dword [esp + 0x78], edi
mov ecx, dword [esp + 0x8c]
mov ebx, dword [esp + 0x90]
lea ebp, [0x606f80]
mov dword [esp], ebp
lea esi, [eax - 1]
xchg esi, ebx
neg ebx
xchg esi, ebx
sar esi, 0x1f
and esi, 8
add esi, edi
mov dword [esp + 4], esi
mov dword [esp + 8], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], ebx
call fcn.00410020
mov eax, dword [esp + 0x78]
mov dword [esp + 0x8c], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x90], eax
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x94], ecx
lea ecx, [0x606f80]
mov dword [esp], ecx
mov dword [esp + 4], 0
mov dword [esp + 8], eax
call fcn.004475c0
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x8c]
mov dword [esp + 0x78], ecx
mov edx, dword [esp + 0x90]
mov dword [esp + 0x50], edx
mov ebx, dword [esp + 0x2c]
xor ebp, ebp
xor esi, esi
jmp 0x50a785
mov eax, dword [esp + 0x8c]
mov dword [esp + 0x78], eax
mov ecx, dword [esp + 0x90]
mov dword [esp + 0x50], ecx
xor edx, edx
jmp 0x50a222
lea edx, [ecx + 1]
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x50]
cmp edx, ecx
jge 0x50a5e4
mov dword [esp + 0x34], edx
lea ebx, [eax + edx*8]
mov ebp, dword [ebx + 4]
mov dword [esp + 0x38], ebp
mov ebx, dword [ebx]
mov dword [esp + 0x5c], ebx
mov esi, dword [0x7ba948]
lea edi, [0x7ba948]
cmp dword [edi + 4], ebp
jne 0x50a2da
mov dword [esp], ebx
mov dword [esp + 4], esi
mov dword [esp + 8], ebp
call fcn.004025c0
movzx eax, byte [esp + 0xc]
test al, al
je 0x50a2c0
mov eax, dword [esp + 0x11c]
test eax, eax
jne 0x50a28b
movzx eax, byte [esp + 0xd4]
mov byte [esp], al
call fcn.0050bbc0
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0x120]
test ecx, ecx
jne 0x50a2b2
mov dword [esp + 0x58], eax
movzx eax, byte [esp + 0xd4]
mov byte [esp], al
call fcn.0050bce0
mov ecx, dword [esp + 4]
mov eax, dword [esp + 0x58]
mov ebx, dword [esp + 0x5c]
mov ebp, dword [esp + 0x38]
mov esi, eax
mov edi, ecx
jmp 0x50a324
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x34]
mov ebx, dword [esp + 0x5c]
mov ebp, dword [esp + 0x38]
lea edi, [0x7ba948]
mov esi, dword [esp + 0x114]
test esi, esi
jne 0x50a313
movzx eax, byte [esp + 0xd4]
mov byte [esp], al
call fcn.0050ba20
mov esi, dword [esp + 4]
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x34]
mov ebx, dword [esp + 0x5c]
mov ebp, dword [esp + 0x38]
lea edi, [0x7ba948]
mov edi, dword [esp + 0x118]
test edi, edi
jne 0x50a324
lea edi, [0x6458e0]
mov dword [esp + 0x74], esi
mov dword [esp + 0x54], edi
mov dword [esp], ebx
mov dword [esp + 4], ebp
call fcn.00408e00
mov edx, dword [esp + 0x74]
mov eax, dword [edx]
mov ecx, dword [esp + 8]
lea ebx, [0x606f80]
mov dword [esp], ebx
mov dword [esp + 4], ecx
call eax
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x12c]
mov dword [esp], edx
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
call fcn.0049ca50
lea eax, [0x6082c0]
mov dword [esp], eax
mov ecx, dword [esp + 0x128]
mov dword [esp + 4], ecx
mov edx, dword [esp + 0x5c]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x38]
mov dword [esp + 0xc], edx
call fcn.0040ee00
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
test ecx, ecx
je 0x50a441
mov ebx, dword [ecx + 8]
cmp ebx, 0x2bd6b23c
je 0x50a3e3
cmp ebx, 0xe0ff5cb4
jne 0x50a3db
lea ebx, [0x606f80]
cmp ecx, ebx
jne 0x50a441
mov ecx, dword [eax + 4]
mov dword [esp + 0x44], ecx
mov edx, dword [eax]
mov dword [esp + 0x68], edx
xor eax, eax
jmp 0x50a5ed
lea ebx, [0x606f80]
jmp 0x50a441
lea ebx, [0x612d60]
cmp ecx, ebx
jne 0x50a43b
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.00408e00
mov edx, dword [esp + 0x54]
mov eax, dword [edx]
mov ecx, dword [esp + 8]
lea ebx, [0x612d60]
mov dword [esp], ebx
mov dword [esp + 4], ecx
call eax
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x12c]
mov dword [esp], edx
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
call fcn.0049ca50
jmp 0x50a5b3
lea ebx, [0x606f80]
mov edx, dword [0x7ba518]
mov ebx, dword [edx]
mov dword [esp], ecx
mov dword [esp + 4], eax
call ebx
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov ebx, dword [esp + 0x10]
mov ebp, dword [esp + 0x14]
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
test ebp, ebp
je 0x50a51d
mov dword [esp + 0x6c], edi
mov dword [esp + 0x70], esi
movzx eax, byte [esp + 0xd4]
lea ecx, [0x606f80]
mov dword [esp], ecx
lea edx, [0x68b2b0]
mov dword [esp + 4], edx
mov dword [esp + 8], 0x1f
mov byte [esp + 0xc], al
call fcn.0050abe0
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x7c], 0
mov dword [esp + 0x80], 0
mov edx, dword [esp + 0x70]
test edx, edx
je 0x50a4ce
mov esi, dword [edx + 4]
jmp 0x50a4d0
mov esi, edx
mov dword [esp + 0x7c], esi
mov edx, dword [esp + 0x6c]
mov dword [esp + 0x80], edx
lea edx, [0x68b794]
mov dword [esp], edx
mov ebx, dword [esp + 0x12c]
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
mov dword [esp + 0xc], ecx
lea eax, [esp + 0x7c]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], 1
mov dword [esp + 0x18], 1
call fcn.004c2c30
jmp 0x50a5b3
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 8], ebx
call fcn.00408e80
mov edx, dword [esp + 0x54]
mov eax, dword [edx]
mov ecx, dword [esp + 0xc]
lea ebx, [0x601320]
mov dword [esp], ebx
mov dword [esp + 4], ecx
call eax
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov dword [esp + 0x7c], 0
mov dword [esp + 0x80], 0
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.00408e00
mov eax, dword [esp + 8]
lea ecx, [0x606f80]
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x80], eax
lea eax, [0x68b794]
mov dword [esp], eax
mov edx, dword [esp + 0x12c]
mov dword [esp + 4], edx
lea ebx, [esp + 0x7c]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], 1
mov dword [esp + 0x10], 1
call fcn.004c2db0
mov eax, dword [esp + 0x90]
dec eax
mov ecx, dword [esp + 0x34]
cmp ecx, eax
jge 0x50a217
mov eax, dword [esp + 0x12c]
mov dword [esp], eax
mov byte [esp + 4], 0x20
call fcn.0049cf10
mov ecx, dword [esp + 0x34]
jmp 0x50a217
add esp, 0xc8
ret
mov eax, ebp
cmp eax, ecx
jge 0x50a730
movzx ebp, byte [edx + eax]
cmp ebp, 0x80
jge 0x50a608
lea ebp, [eax + 1]
cmp eax, ecx
jmp 0x50a634
mov dword [esp + 0x30], eax
mov dword [esp], edx
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
call fcn.004588b0
mov ebp, dword [esp + 0x10]
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x44]
cmp eax, ecx
mov edx, dword [esp + 0x68]
lea ebx, [0x606f80]
jae 0x50a779
movzx esi, byte [edx + eax]
xchg esi, eax
cmp al, 0x20
xchg esi, eax
jb 0x50a661
xchg esi, eax
cmp al, 0x7e
xchg esi, eax
ja 0x50a661
xchg esi, eax
cmp al, 0x20
xchg esi, eax
je 0x50a661
xchg esi, eax
cmp al, 0x5c
xchg esi, eax
je 0x50a661
xchg esi, eax
cmp al, 0x22
xchg esi, eax
jne 0x50a5eb
lea eax, [0x607140]
mov dword [esp], eax
mov dword [esp + 4], 0
lea edx, [ecx + ecx*2]
mov ebx, edx
shr edx, 0x1f
add edx, ebx
sar edx, 1
mov dword [esp + 0x4c], edx
mov dword [esp + 8], edx
call fcn.004475c0
mov eax, dword [esp + 0xc]
mov dword [esp], eax
mov dword [esp + 4], 0
mov eax, dword [esp + 0x4c]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x68]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x44]
mov dword [esp + 0x10], eax
mov word [esp + 0x14], 0x22
mov byte [esp + 0x16], 0
call fcn.004ad900
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov dword [esp], 0
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
call fcn.0044aee0
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.00408e00
mov edx, dword [esp + 0x54]
mov eax, dword [edx]
mov ecx, dword [esp + 8]
lea ebx, [0x606f80]
mov dword [esp], ebx
mov dword [esp + 4], ecx
call eax
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x12c]
mov dword [esp], edx
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
call fcn.0049ca50
jmp 0x50a5b3
mov dword [esp], edx
mov dword [esp + 4], ecx
call fcn.00408e00
mov edx, dword [esp + 0x54]
mov eax, dword [edx]
mov ecx, dword [esp + 8]
lea ebx, [0x606f80]
mov dword [esp], ebx
mov dword [esp + 4], ecx
call eax
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x12c]
mov dword [esp], edx
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
call fcn.0049ca50
jmp 0x50a5b3
call fcn.0045e9d0
inc ebp
mov edx, dword [esp + 0x50]
mov ecx, edi
cmp ebp, edx
jge 0x50a82a
mov edi, ecx
lea ecx, [ecx + ebp*8]
mov edx, dword [ecx + 4]
mov ecx, dword [ecx]
test edx, edx
je 0x50a77e
mov dword [esp + 0x4c], ebp
lea ebp, [esi + 1]
cmp ebx, ebp
jae 0x50a7ef
mov dword [esp + 0x60], ecx
mov dword [esp + 0x28], esi
mov dword [esp + 0x3c], edx
lea ecx, [0x606f80]
mov dword [esp], ecx
mov dword [esp + 4], eax
mov dword [esp + 8], esi
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], ebp
call fcn.00447740
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
lea ebp, [ecx + 1]
mov ecx, dword [esp + 0x60]
mov edx, dword [esp + 0x3c]
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x78]
mov dword [esp + 0x2c], ebx
lea ebx, [eax + esi*8 + 4]
mov dword [ebx], edx
mov edx, dword [0x7e77b0]
lea ebx, [eax + esi*8]
test edx, edx
jne 0x50a80a
mov dword [ebx], ecx
jmp 0x50a81b
mov edx, edi
mov edi, ebx
mov esi, eax
mov eax, ecx
call fcn.0045e950
mov eax, esi
mov edi, edx
mov ebx, dword [esp + 0x2c]
mov esi, ebp
mov ebp, dword [esp + 0x4c]
jmp 0x50a77e
mov dword [esp + 0x8c], eax
mov dword [esp + 0x90], esi
mov dword [esp + 0x94], ebx
jmp 0x50a1fd
mov eax, 1
call fcn.0045ea30
call fcn.0045e9d0
call fcn.0045e9d0
inc ebp
mov ecx, edi
cmp ebp, ebx
jge 0x509dde
lea esi, [ecx + ebp*8]
mov edi, ecx
mov ecx, dword [esi]
cmp dword [esi + 4], edx
jne 0x50a858
mov dword [esp + 0x4c], ebp
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
call fcn.004025c0
movzx eax, byte [esp + 0xc]
test al, al
jne 0x509dcc
mov eax, dword [esp + 0x64]
mov edx, dword [esp + 0x40]
mov ebx, dword [esp + 0x50]
mov ebp, dword [esp + 0x4c]
mov edi, dword [esp + 0x78]
jmp 0x50a858
call fcn.0045d540
jmp fcn.00509ce0