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

Disassembly:
mov ecx, dword [0x7da588]
mov ecx, dword fs:[ecx]
mov ecx, dword [ecx]
lea eax, [esp - 0x24]
cmp eax, dword [ecx + 8]
jbe 0x504736
sub esp, 0xa4
lea eax, [0x5f0100]
mov dword [esp], eax
call fcn.0040d1f0
mov eax, dword [esp + 4]
mov dword [esp + 0x68], eax
mov ecx, dword [esp + 0xa8]
mov dword [esp], ecx
call fcn.00504ba0
mov eax, dword [esp + 4]
movzx ecx, byte [esp + 0xc]
mov edx, dword [esp + 8]
jmp 0x50406e
mov eax, dword [esp + 0xa8]
mov dword [esp], eax
call fcn.00504ba0
mov eax, dword [esp + 4]
movzx ecx, byte [esp + 0xc]
mov edx, dword [esp + 8]
test cl, cl
je 0x5040ea
mov dword [esp + 0x34], edx
mov dword [esp + 0x60], eax
mov dword [esp], eax
mov dword [esp + 4], edx
mov byte [esp + 8], 0x23
call fcn.00403120
mov ecx, dword [esp + 0xc]
cmp ecx, 0xffffffff
je 0x5040a1
mov edx, dword [esp + 0x34]
cmp edx, ecx
jae 0x5040a5
jmp 0x504730
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x60]
jmp 0x504109
test ecx, ecx
je 0x504052
mov dword [esp + 0x34], ecx
mov dword [esp + 0x54], eax
mov dword [esp], eax
mov dword [esp + 4], ecx
mov byte [esp + 8], 0x3a
call fcn.00403120
mov ecx, dword [esp + 0xc]
cmp ecx, 0xffffffff
je 0x50414d
mov edx, dword [esp + 0x34]
cmp edx, ecx
jb 0x50472b
mov eax, dword [esp + 0x54]
mov ebx, ecx
mov ebp, eax
jmp 0x5041b4
mov eax, dword [esp + 0x68]
mov dword [esp + 0xac], eax
add esp, 0xa4
ret
dec ecx
mov edx, ecx
neg edx
sar edx, 0x1f
and edx, 1
add eax, edx
test ecx, ecx
je 0x504127
movzx edx, byte [eax]
cmp dl, 0x20
je 0x5040fc
cmp dl, 9
je 0x5040fc
cmp dl, 0xa
je 0x5040fc
cmp dl, 0xd
je 0x5040fc
jmp 0x504127
dec ecx
test ecx, ecx
je 0x504052
movzx edx, byte [eax + ecx - 1]
cmp dl, 0x20
je 0x504126
cmp dl, 9
je 0x504126
cmp dl, 0xa
je 0x504126
cmp dl, 0xd
je 0x504126
jmp 0x5040ab
lea eax, [0x5e55c0]
mov dword [esp], eax
call fcn.0040d1f0
mov eax, dword [esp + 4]
mov dword [eax + 4], 0x10
lea ecx, [0x60db80]
mov dword [eax], ecx
lea ecx, [0x658a48]
mov edx, dword [esp + 0x68]
mov dword [edx + 0x14], ecx
mov ecx, dword [0x7da640]
test ecx, ecx
je 0x504192
call fcn.0046be80
mov dword [edi], eax
mov ecx, dword [edx + 0x18]
mov dword [edi + 4], ecx
mov dword [edx + 0x18], eax
mov dword [esp + 0xac], edx
add esp, 0xa4
ret
dec ecx
mov esi, ecx
xchg esi, ebx
neg ebx
xchg esi, ebx
sar esi, 0x1f
and esi, 1
add eax, esi
test ecx, ecx
je 0x5041da
movzx esi, byte [eax]
xchg esi, eax
cmp al, 0x20
xchg esi, eax
je 0x5041a3
xchg esi, eax
cmp al, 9
xchg esi, eax
je 0x5041a3
xchg esi, eax
cmp al, 0xa
xchg esi, eax
je 0x5041a3
xchg esi, eax
cmp al, 0xd
xchg esi, eax
je 0x5041a3
jmp 0x5041da
dec ecx
test ecx, ecx
je 0x5041ff
movzx esi, byte [ecx + eax - 1]
xchg esi, eax
cmp al, 0x20
xchg esi, eax
je 0x5041d9
xchg esi, eax
cmp al, 9
xchg esi, eax
je 0x5041d9
xchg esi, eax
cmp al, 0xa
xchg esi, eax
je 0x5041d9
xchg esi, eax
cmp al, 0xd
xchg esi, eax
je 0x5041d9
lea esi, [ebx + 1]
cmp edx, esi
jb 0x504722
mov dword [esp + 0x50], eax
mov dword [esp + 0x24], ecx
sub edx, ebx
dec edx
mov ebx, edx
neg edx
sar edx, 0x1f
and esi, edx
lea edx, [ebp + esi]
jmp 0x504240
lea esi, [esp + 0x78]
call fcn.0046c56e
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x24]
mov ebx, dword [esp + 0x2c]
mov edx, dword [esp + 0xa0]
jmp 0x50454f
test ebx, ebx
je 0x504052
mov dword [esp + 0x4c], edx
mov dword [esp + 0x2c], ebx
mov dword [esp], edx
mov dword [esp + 4], ebx
mov byte [esp + 8], 0x20
call fcn.00403120
mov ecx, dword [esp + 0xc]
cmp ecx, 0xffffffff
je 0x50429e
mov edx, dword [esp + 0x2c]
cmp edx, ecx
jb 0x50471d
lea eax, [ecx + 1]
cmp edx, eax
jb 0x504716
sub edx, ecx
dec edx
mov ebx, edx
neg edx
sar edx, 0x1f
and eax, edx
mov edx, dword [esp + 0x4c]
lea ebp, [edx + eax]
jmp 0x5046bf
xor eax, eax
xor ecx, ecx
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x30], edx
test eax, eax
je 0x5043c6
cmp byte [ecx], 0x5b
je 0x5042c2
xor esi, esi
xor ebp, ebp
xor ebx, ebx
jmp 0x5043cc
mov dword [esp + 0x44], eax
mov dword [esp + 0x5c], ecx
mov dword [esp], ecx
mov dword [esp + 4], eax
mov byte [esp + 8], 0x5d
call fcn.00403120
mov ecx, dword [esp + 0xc]
cmp ecx, 0xffffffff
je 0x504642
mov edx, dword [esp + 0x44]
cmp edx, ecx
jb 0x5046a9
cmp ecx, 1
jb 0x50469d
mov dword [esp + 0x40], ecx
mov dword [esp + 0x6c], 0
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], 0
lea eax, [ecx - 1]
mov dword [esp + 0x20], eax
mov edx, eax
neg eax
sar eax, 0x1f
and eax, 1
mov ebx, dword [esp + 0x5c]
add eax, ebx
mov dword [esp + 0x48], eax
mov dword [esp + 0x8c], 0
mov dword [esp + 0x90], 0
lea ebp, [0x504740]
mov dword [esp + 0x8c], ebp
lea esi, [esp + 0x6c]
mov dword [esp + 0x90], esi
mov dword [esp], eax
mov dword [esp + 4], edx
lea esi, [esp + 0x8c]
mov dword [esp + 8], esi
call fcn.00505340
mov eax, dword [esp + 0xc]
test eax, eax
jne 0x5045a3
mov edx, dword [esp + 0x40]
lea eax, [edx + 1]
mov ecx, dword [esp + 0x44]
cmp ecx, eax
jb 0x504698
sub ecx, edx
lea edx, [ecx - 1]
mov ebx, edx
neg edx
sar edx, 0x1f
and eax, edx
mov edx, dword [esp + 0x6c]
mov ebp, dword [esp + 0x70]
mov esi, dword [esp + 0x74]
mov ecx, edx
mov edx, dword [esp + 0x5c]
add edx, eax
mov eax, ebx
mov ebx, ecx
mov ecx, edx
mov edx, dword [esp + 0x30]
jmp 0x5043cc
xor esi, esi
xor ebp, ebp
xor ebx, ebx
mov dword [esp + 0x2c], eax
mov dword [esp + 0xa0], ecx
mov ecx, dword [esp + 0x68]
mov eax, dword [ecx + 0x1c]
test eax, eax
jne 0x50442c
mov dword [esp + 0x3c], esi
mov dword [esp + 0x38], ebp
mov dword [esp + 0x64], ebx
call fcn.0040dc20
mov eax, dword [0x7da640]
mov ecx, dword [esp]
test eax, eax
jne 0x504406
mov edx, dword [esp + 0x68]
jmp 0x504417
call fcn.0046be80
mov dword [edi], ecx
mov edx, dword [esp + 0x68]
mov ebx, dword [edx + 0x1c]
mov dword [edi + 4], ebx
mov dword [edx + 0x1c], ecx
mov ecx, edx
mov edx, dword [esp + 0x30]
mov ebx, dword [esp + 0x64]
mov ebp, dword [esp + 0x38]
mov esi, dword [esp + 0x3c]
mov eax, dword [ecx + 0x1c]
mov dword [esp + 0x9c], eax
lea edi, [esp + 0x78]
xor eax, eax
call fcn.0046c08b
mov ecx, dword [esp + 0x4c]
mov dword [esp + 0x78], ecx
mov dword [esp + 0x7c], edx
mov dword [esp + 0x80], ebx
mov dword [esp + 0x84], ebp
mov dword [esp + 0x88], esi
lea ecx, [0x5dfb80]
mov dword [esp], ecx
mov edx, dword [esp + 0x9c]
mov dword [esp + 4], edx
mov edx, dword [esp + 0x50]
mov dword [esp + 8], edx
mov ebx, dword [esp + 0x24]
mov dword [esp + 0xc], ebx
call fcn.004118a0
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + 8]
mov ebx, dword [ecx + 4]
inc ebx
mov ebp, dword [ecx]
cmp edx, ebx
jae 0x5044f9
mov dword [esp + 0x98], ecx
mov dword [esp], ebp
mov dword [esp + 4], ebx
mov dword [esp + 8], edx
mov dword [esp + 0xc], 1
lea eax, [0x5f0e00]
mov dword [esp + 0x10], eax
call fcn.00450060
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov ebx, dword [esp + 0x98]
mov dword [ebx + 8], eax
mov eax, dword [0x7da640]
test eax, eax
je 0x5044f1
call fcn.0046be80
mov dword [edi], ecx
mov eax, dword [ebx]
mov dword [edi + 4], eax
mov dword [ebx], ecx
mov ebp, ecx
mov ecx, ebx
mov ebx, edx
mov dword [ecx + 4], ebx
mov eax, dword [0x7da640]
lea ecx, [ebx + ebx*4]
lea edi, [ebp + ecx*4 - 0x14]
test eax, eax
je 0x504224
mov dword [esp + 0x94], edi
lea eax, [0x5f0e00]
mov dword [esp], eax
mov dword [esp + 4], edi
lea eax, [esp + 0x78]
mov dword [esp + 8], eax
call fcn.00412350
mov edi, dword [esp + 0x94]
jmp 0x504224
dec ebx
mov ebp, ebx
xchg ebp, ebx
neg ebx
xchg ebp, ebx
sar ebp, 0x1f
and ebp, 1
add edx, ebp
test ebx, ebx
je 0x504575
movzx ebp, byte [edx]
xchg ebp, eax
cmp al, 0x20
xchg ebp, eax
je 0x50453e
xchg ebp, eax
cmp al, 9
xchg ebp, eax
je 0x50453e
xchg ebp, eax
cmp al, 0xa
xchg ebp, eax
je 0x50453e
xchg ebp, eax
cmp al, 0xd
xchg ebp, eax
je 0x50453e
jmp 0x504575
dec ebx
test ebx, ebx
je 0x504052
movzx ebp, byte [ebx + edx - 1]
xchg ebp, eax
cmp al, 0x20
xchg ebp, eax
je 0x504574
xchg ebp, eax
cmp al, 9
xchg ebp, eax
je 0x504574
xchg ebp, eax
cmp al, 0xa
xchg ebp, eax
je 0x504574
xchg ebp, eax
cmp al, 0xd
xchg ebp, eax
je 0x504574
jmp 0x504245
mov dword [esp], 0
lea eax, [0x60e869]
mov dword [esp + 4], eax
mov dword [esp + 8], 0x12
mov eax, dword [esp + 0x48]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x10], eax
call fcn.00453a60
mov eax, dword [esp + 0x18]
mov dword [esp + 0x28], eax
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x58], ecx
lea edx, [0x5e55c0]
mov dword [esp], edx
call fcn.0040d1f0
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0x28]
mov dword [eax + 4], ecx
mov ecx, dword [0x7da640]
test ecx, ecx
jne 0x50460e
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x68]
jmp 0x504626
call fcn.0046be90
mov ecx, dword [esp + 0x58]
mov dword [edi], ecx
mov dword [edi + 4], eax
mov edx, dword [esp + 0x68]
mov ebx, dword [edx + 0x18]
mov dword [edi + 8], ebx
mov dword [eax], ecx
lea ecx, [0x658a48]
mov dword [edx + 0x14], ecx
mov dword [edx + 0x18], eax
mov dword [esp + 0xac], edx
add esp, 0xa4
ret
lea eax, [0x5e55c0]
mov dword [esp], eax
call fcn.0040d1f0
mov eax, dword [esp + 4]
mov dword [eax + 4], 0x1a
lea ecx, [0x6128fe]
mov dword [eax], ecx
lea ecx, [0x658a48]
mov edx, dword [esp + 0x68]
mov dword [edx + 0x14], ecx
mov ecx, dword [0x7da640]
test ecx, ecx
je 0x504687
call fcn.0046be80
mov dword [edi], eax
mov ecx, dword [edx + 0x18]
mov dword [edi + 4], ecx
mov dword [edx + 0x18], eax
mov dword [esp + 0xac], edx
add esp, 0xa4
ret
call fcn.0046bf50
mov eax, 1
xor ecx, ecx
call fcn.0046bf50
call fcn.0046bf10
dec ebx
mov esi, ebx
xchg esi, ebx
neg ebx
xchg esi, ebx
sar esi, 0x1f
and esi, 1
add ebp, esi
test ebx, ebx
je 0x5046e6
movzx esi, byte [ebp]
xchg esi, eax
cmp al, 0x20
xchg esi, eax
je 0x5046ae
xchg esi, eax
cmp al, 9
xchg esi, eax
je 0x5046ae
xchg esi, eax
cmp al, 0xa
xchg esi, eax
je 0x5046ae
xchg esi, eax
cmp al, 0xd
xchg esi, eax
je 0x5046ae
jmp 0x5046e6
dec ebx
test ebx, ebx
je 0x50470b
movzx esi, byte [ebx + ebp - 1]
xchg esi, eax
cmp al, 0x20
xchg esi, eax
je 0x5046e5
xchg esi, eax
cmp al, 9
xchg esi, eax
je 0x5046e5
xchg esi, eax
cmp al, 0xa
xchg esi, eax
je 0x5046e5
xchg esi, eax
cmp al, 0xd
xchg esi, eax
je 0x5046e5
mov eax, ebx
mov edx, ecx
mov ecx, ebp
jmp 0x5042a6
mov ecx, edx
call fcn.0046bf50
call fcn.0046bf10
mov eax, esi
mov ecx, edx
call fcn.0046bf50
call fcn.0046bf10
call fcn.0046bf10
nop
call fcn.0046aa70
jmp fcn.00504000