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

Disassembly:
mov ecx, dword [0x6b21fc]
mov ecx, dword fs:[ecx]
mov ecx, dword [ecx]
lea eax, [esp - 0xdc]
cmp eax, dword [ecx + 8]
jbe 0x501162
sub esp, 0x15c
lea edi, [esp + 0x164]
xor eax, eax
call fcn.00468a95
mov ecx, dword [esp + 0x160]
mov edx, dword [ecx + 0x70]
lea esi, [ecx + 8]
mov ebx, dword [ecx + 0x6c]
mov ebp, ebx
sar ebx, 0x1f
mov eax, 0xaaaaaaab
mov edi, edx
imul ebp
add edx, ebp
sar edx, 4
sub edx, ebx
mov ebx, edi
sar edi, 0x1f
mov eax, 0x61861862
mov ebp, edx
imul ebx
sar edx, 3
sub edx, edi
mov dword [esp + 0x4c], edx
lea edi, [esp + 0xf0]
xor eax, eax
call fcn.00468a95
mov ecx, dword [esp + 0x160]
mov ebx, dword [ecx]
mov edi, dword [ecx + 4]
mov dword [esp + 0xf0], ebx
mov dword [esp + 0xf4], edi
xchg ebp, eax
mov byte [esp + 0x106], al
xchg ebp, eax
mov byte [esp + 0x107], dl
lea edi, [esp + 0x108]
call fcn.00468eee
test ebp, ebp
je 0x500701
test edx, edx
je 0x500701
mov dword [esp + 0x64], ebp
mov eax, dword [esp + 0x160]
mov ecx, dword [eax + 0x74]
mov dword [esp], ecx
call fcn.004fa7e0
mov eax, dword [esp + 0x160]
mov ecx, dword [eax + 0x1034]
mov edx, dword [esp + 4]
mov ebx, dword [esp + 0xc]
test ecx, ecx
je 0x5006d2
mov ebp, dword [eax + 0x1030]
movzx ebp, byte [ebp]
jmp 0x5006d7
mov ebp, 0xffffffff
mov dword [esp + 0x94], edx
mov dword [esp + 0x5c], ebx
mov esi, dword [esp + 4]
mov dword [esp + 0x78], esi
mov edi, dword [esp + 8]
mov dword [esp + 0x58], edi
test ebp, ebp
jl 0x5007e0
xor ecx, ecx
jmp 0x500fd1
mov dword [esp + 0xc8], 0
mov dword [esp + 0xcc], 0
mov dword [esp + 0xd0], 0
mov dword [esp + 0xd4], 0
mov dword [esp], ebp
call fcn.00409b00
mov eax, dword [esp + 4]
lea ecx, [0x52aa00]
mov dword [esp + 0xc8], ecx
mov dword [esp + 0xcc], eax
mov eax, dword [esp + 0x4c]
mov dword [esp], eax
call fcn.00409b00
mov eax, dword [esp + 4]
lea ecx, [0x52aa00]
mov dword [esp + 0xd0], ecx
mov dword [esp + 0xd4], eax
lea eax, [0x552a95]
mov dword [esp], eax
mov dword [esp + 4], 0x2e
lea eax, [esp + 0xc8]
mov dword [esp + 8], eax
mov dword [esp + 0xc], 2
mov dword [esp + 0x10], 2
call fcn.004a1ec0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x94], ecx
lea edi, [esp + 0x164]
lea esi, [esp + 0xf0]
call fcn.00468eb2
mov dword [esp + 0x1d0], eax
mov eax, dword [esp + 0x94]
mov dword [esp + 0x1d4], eax
add esp, 0x15c
ret
test edi, edi
jbe 0x500fb5
movzx ecx, byte [esi]
mov byte [esp + 0x105], cl
cmp edi, 1
jle 0x500802
movzx ecx, byte [esi + 4]
mov byte [esp + 0x104], cl
call fcn.0040ce30
mov eax, dword [esp]
mov dword [esp + 0x90], eax
call fcn.0040ce30
mov eax, dword [esp]
mov dword [esp + 0x7c], eax
mov byte [esp + 0x2a], 0
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x78]
xor ebx, ebx
jmp 0x50084d
movzx ebp, byte [esp + 0x2a]
inc ebp
xchg ebp, eax
mov byte [esp + 0x2a], al
xchg ebp, eax
mov ebp, dword [esp + 0x60]
lea ebx, [ebp + 1]
mov ecx, dword [esp + 0x58]
mov eax, dword [esp + 0x7c]
mov edx, dword [esp + 0x78]
cmp ebx, ecx
jge 0x500983
lea ebp, [edx + ebx*4]
movzx esi, byte [ebp]
movzx edi, byte [ebp + 1]
movzx edx, byte [ebp + 2]
movzx ebp, byte [ebp + 3]
xchg esi, eax
mov byte [esp + 0x54], al
xchg esi, eax
xchg edi, eax
mov byte [esp + 0x55], al
xchg edi, eax
mov byte [esp + 0x56], dl
xchg ebp, eax
mov byte [esp + 0x57], al
xchg ebp, eax
cmp byte [esp + 0x2a], 1
ja 0x500917
mov dword [esp + 0x60], ebx
lea ecx, [0x52bea0]
mov dword [esp], ecx
mov dword [esp + 4], eax
lea edx, [esp + 0x2a]
mov dword [esp + 8], edx
call fcn.0040d3f0
movzx eax, byte [esp + 0x10]
test al, al
jne 0x50082e
lea eax, [0x538380]
mov dword [esp], eax
mov ecx, dword [esp + 0x90]
mov dword [esp + 4], ecx
lea edx, [esp + 0x55]
mov dword [esp + 8], edx
call fcn.0040d770
mov eax, dword [esp + 0xc]
movzx ecx, byte [esp + 0x2a]
mov byte [eax], cl
movzx eax, byte [esp + 0x54]
mov byte [esp + 0x2c], al
lea ecx, [0x52bea0]
mov dword [esp], ecx
mov edx, dword [esp + 0x7c]
mov dword [esp + 4], edx
lea ebx, [esp + 0x2a]
mov dword [esp + 8], ebx
call fcn.0040d770
mov eax, dword [esp + 0xc]
movzx ecx, byte [esp + 0x2c]
mov byte [eax], cl
jmp 0x50082e
lea eax, [0x548be1]
mov dword [esp], eax
mov dword [esp + 4], 0x10
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], 0
call fcn.004a1ec0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x94], ecx
lea edi, [esp + 0x164]
lea esi, [esp + 0xf0]
call fcn.00468eb2
mov dword [esp + 0x1d0], eax
mov eax, dword [esp + 0x94]
mov dword [esp + 0x1d4], eax
add esp, 0x15c
ret
mov edx, dword [esp + 0x160]
movzx ebx, byte [edx + 0x18]
test bl, bl
je 0x500bc5
mov dword [esp + 0xb8], 0
mov dword [esp + 0xbc], 0
mov eax, dword [esp + 0x94]
mov dword [esp], eax
mov dword [esp + 4], ecx
mov eax, dword [esp + 0x5c]
mov dword [esp + 8], eax
call fcn.00409c90
mov eax, dword [esp + 0xc]
lea ecx, [0x5269e0]
mov dword [esp + 0xb8], ecx
mov dword [esp + 0xbc], eax
lea edi, [esp + 0xd8]
xor eax, eax
call fcn.00468aaa
lea ecx, [0x5012f0]
mov dword [esp + 0xd8], ecx
mov dword [esp + 0xe0], 0x12
lea ecx, [0x54958c]
mov dword [esp + 0xdc], ecx
mov dword [esp + 0xe8], 1
mov dword [esp + 0xec], 1
lea ecx, [esp + 0xb8]
mov dword [esp + 0xe4], ecx
mov ecx, dword [0x68b9c4]
mov dword [esp], ecx
mov dword [esp + 4], 0
mov dword [esp + 8], 2
lea ecx, [esp + 0xd8]
mov dword [esp + 0xc], ecx
call fcn.004b1180
mov dword [esp + 0xb0], 0
mov dword [esp + 0xb4], 0
lea eax, [0x538380]
mov dword [esp + 0xb0], eax
mov ecx, dword [esp + 0x90]
mov dword [esp + 0xb4], ecx
lea edi, [esp + 0xd8]
xor eax, eax
call fcn.00468aaa
lea ecx, [0x501270]
mov dword [esp + 0xd8], ecx
mov dword [esp + 0xe0], 0x10
lea ecx, [0x548bf1]
mov dword [esp + 0xdc], ecx
mov dword [esp + 0xe8], 1
mov dword [esp + 0xec], 1
lea ecx, [esp + 0xb0]
mov dword [esp + 0xe4], ecx
mov ecx, dword [0x68b9c4]
mov dword [esp], ecx
mov dword [esp + 4], 0
mov dword [esp + 8], 2
lea ecx, [esp + 0xd8]
mov dword [esp + 0xc], ecx
call fcn.004b1180
mov dword [esp + 0xa8], 0
mov dword [esp + 0xac], 0
lea eax, [0x52bea0]
mov dword [esp + 0xa8], eax
mov eax, dword [esp + 0x7c]
mov dword [esp + 0xac], eax
lea edi, [esp + 0xd8]
xor eax, eax
call fcn.00468aaa
lea ecx, [0x5011f0]
mov dword [esp + 0xd8], ecx
mov dword [esp + 0xe0], 0x15
lea ecx, [0x54aa1d]
mov dword [esp + 0xdc], ecx
mov dword [esp + 0xe8], 1
mov dword [esp + 0xec], 1
lea ecx, [esp + 0xa8]
mov dword [esp + 0xe4], ecx
mov ecx, dword [0x68b9c4]
mov dword [esp], ecx
mov dword [esp + 4], 0
mov dword [esp + 8], 2
lea ecx, [esp + 0xd8]
mov dword [esp + 0xc], ecx
call fcn.004b1180
mov edx, dword [esp + 0x160]
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x4c]
xor ebx, ebx
jmp 0x500bd2
inc ebx
cmp ebx, ecx
jge 0x500be1
mov dword [esp + 0x40], ebx
xor ebp, ebp
jmp 0x500ca8
movzx edx, byte [edx + 0x1a]
test dl, dl
jne 0x500c67
mov dword [esp + 0x98], 0
mov dword [esp + 0x9c], 0
imul eax, ecx
mov dword [esp], eax
call fcn.00409b00
mov eax, dword [esp + 4]
lea ecx, [0x52aa00]
mov dword [esp + 0x98], ecx
mov dword [esp + 0x9c], eax
mov eax, dword [0x68b9cc]
lea ecx, [0x5d4354]
mov dword [esp], ecx
mov dword [esp + 4], eax
lea eax, [0x54aa32]
mov dword [esp + 8], eax
mov dword [esp + 0xc], 0x15
lea eax, [esp + 0x98]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], 1
mov dword [esp + 0x18], 1
call fcn.004a48b0
lea edi, [esp + 0x164]
lea esi, [esp + 0xf0]
call fcn.00468eb2
mov dword [esp + 0x1d0], 0
mov dword [esp + 0x1d4], 0
add esp, 0x15c
ret
mov dword [esp + 0xfc], edi
mov byte [edi + ecx - 1], 0
inc ebp
mov ecx, dword [esp + 0x4c]
cmp ebp, eax
jge 0x500bd1
mov dword [esp + 0x44], ebp
xor esi, esi
jmp 0x500d2b
mov esi, dword [esp + 0x100]
mov edi, dword [esp + 0xfc]
inc edi
mov ecx, dword [esp + 0xf8]
cmp esi, edi
jae 0x500c97
mov dword [esp], ecx
mov dword [esp + 4], edi
mov dword [esp + 8], esi
mov dword [esp + 0xc], 1
lea eax, [0x52abc0]
mov dword [esp + 0x10], eax
call fcn.0044f350
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
mov dword [esp + 0x100], eax
mov dword [esp + 0xf8], ecx
mov eax, dword [esp + 0x64]
mov edx, dword [esp + 0x160]
mov ebx, dword [esp + 0x40]
mov ebp, dword [esp + 0x44]
jmp 0x500c97
inc esi
mov ecx, dword [esp + 0x4c]
cmp esi, 0x15
jge 0x500cb8
mov dword [esp + 0x34], esi
lea edi, [ebx + ebx*4]
lea edi, [ebx + edi*4]
add edi, esi
mov dword [esp + 0x30], edi
mov dword [esp + 0x70], eax
xor eax, eax
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x70]
jmp 0x500d77
mov dword [esp + 0xfc], ebx
movzx eax, byte [esp + 0x29]
mov byte [ebx + esi - 1], al
lea eax, [ecx + 1]
mov ecx, dword [esp + 0x4c]
mov ebx, dword [esp + 0x40]
mov esi, dword [esp + 0x34]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x3c]
cmp ecx, 3
jge 0x500d26
lea eax, [ebp + ebp*2]
shl eax, 3
lea eax, [eax + ecx*8]
mov dword [esp + 0x38], eax
mov dword [esp + 0x68], eax
xor eax, eax
mov dword [esp + 0x48], eax
xor eax, eax
mov byte [esp + 0x29], al
mov eax, dword [esp + 0x68]
jmp 0x500e3f
mov eax, dword [esp + 0x100]
mov ebx, dword [esp + 0xfc]
inc ebx
mov esi, dword [esp + 0xf8]
cmp eax, ebx
jae 0x500d50
mov dword [esp], esi
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
mov dword [esp + 0xc], 1
lea eax, [0x52abc0]
mov dword [esp + 0x10], eax
call fcn.0044f350
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x100], eax
mov dword [esp + 0xf8], esi
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x160]
mov ebp, dword [esp + 0x44]
mov edi, dword [esp + 0x30]
jmp 0x500d50
lea eax, [edx + 1]
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x160]
mov ebp, dword [esp + 0x44]
mov esi, dword [esp + 0x34]
mov edi, dword [esp + 0x30]
mov dword [esp + 0x48], eax
mov byte [esp + 0x29], bl
mov eax, dword [esp + 0x38]
mov ebx, dword [esp + 0x40]
mov ebx, dword [esp + 0x48]
cmp ebx, 8
jge 0x500da7
mov dword [esp], edx
lea ecx, [ebx + eax]
mov dword [esp + 4], ecx
mov dword [esp + 8], edi
call fcn.004f2650
movzx eax, byte [esp + 0xc]
movzx ecx, byte [esp + 0xd]
movzx edx, byte [esp + 0xe]
mov byte [esp + 0x2d], al
mov byte [esp + 0x2e], cl
mov byte [esp + 0x2f], dl
lea eax, [0x538380]
mov dword [esp], eax
mov ecx, dword [esp + 0x90]
mov dword [esp + 4], ecx
lea edx, [esp + 0x2d]
mov dword [esp + 8], edx
call fcn.0040d3f0
movzx eax, byte [esp + 0x10]
test al, al
je 0x500ec9
mov eax, dword [esp + 0xc]
movzx eax, byte [eax]
mov edx, dword [esp + 0x48]
lea ecx, [edx - 7]
neg ecx
shl eax, cl
cmp cl, 0x20
sbb ebx, ebx
and eax, ebx
movzx ebx, byte [esp + 0x29]
or ebx, eax
jmp 0x500e15
mov eax, dword [esp + 0x160]
movzx ecx, byte [eax + 0x18]
test cl, cl
je 0x500fa7
mov dword [esp + 0xa0], 0
mov dword [esp + 0xa4], 0
lea eax, [0x53ae00]
mov dword [esp], eax
lea ecx, [esp + 0x2d]
mov dword [esp + 4], ecx
call fcn.00409a30
mov eax, dword [esp + 8]
lea ecx, [0x53ae00]
mov dword [esp + 0xa0], ecx
mov dword [esp + 0xa4], eax
lea edi, [esp + 0xd8]
xor eax, eax
call fcn.00468aaa
lea ecx, [0x501170]
mov dword [esp + 0xd8], ecx
mov dword [esp + 0xe0], 0x11
lea edx, [0x549110]
mov dword [esp + 0xdc], edx
mov dword [esp + 0xe8], 1
mov dword [esp + 0xec], 1
lea ebx, [esp + 0xa0]
mov dword [esp + 0xe4], ebx
mov ebx, dword [0x68b9c4]
mov dword [esp], ebx
mov dword [esp + 4], 0
mov dword [esp + 8], 2
lea ebx, [esp + 0xd8]
mov dword [esp + 0xc], ebx
call fcn.004b1180
mov eax, dword [esp + 0x160]
mov edx, dword [esp + 0x48]
movzx ebx, byte [esp + 0x29]
jmp 0x500e15
xor eax, eax
mov ecx, eax
call fcn.004688d0
inc ecx
mov eax, dword [esp + 0x160]
mov edx, dword [esp + 0x94]
mov ebx, dword [esp + 0x5c]
cmp ecx, edi
jge 0x5007e0
lea ebx, [esi + ecx*4]
movzx edx, byte [ebx]
lea eax, [esi + ecx*4]
xchg ebp, eax
cmp al, dl
xchg ebp, eax
jne 0x500fbe
mov dword [esp + 0x50], ebp
mov dword [esp + 0x8c], eax
movzx ebp, byte [ebx + 1]
lea edi, [esi + ecx*4 + 1]
mov dword [esp + 0x88], edi
movzx edi, byte [ebx + 2]
lea eax, [esi + ecx*4 + 2]
mov dword [esp + 0x84], eax
movzx ebx, byte [ebx + 3]
lea ecx, [esi + ecx*4 + 3]
mov dword [esp + 0x80], ecx
movzx ecx, byte [esi + 1]
movzx eax, byte [esi + 2]
mov byte [esp + 0x2c], al
movzx eax, byte [esi + 3]
mov byte [esp + 0x2b], al
movzx eax, byte [esi]
mov byte [esi], dl
xchg ebp, eax
mov byte [esi + 1], al
xchg ebp, eax
xchg edi, eax
mov byte [esi + 2], al
xchg edi, eax
mov byte [esi + 3], bl
mov edx, dword [esp + 0x8c]
mov byte [edx], al
mov edx, dword [esp + 0x88]
mov byte [edx], cl
movzx edx, byte [esp + 0x2c]
mov ebx, dword [esp + 0x84]
mov byte [ebx], dl
movzx edx, byte [esp + 0x2b]
mov ebx, dword [esp + 0x80]
mov byte [ebx], dl
mov edx, dword [esp + 0x160]
movzx ebx, byte [edx + 0x18]
test bl, bl
je 0x50114c
mov dword [esp + 0xc0], 0
mov dword [esp + 0xc4], 0
mov eax, dword [esp + 0x50]
mov dword [esp], eax
call fcn.00409b00
mov eax, dword [esp + 4]
lea ecx, [0x52aa00]
mov dword [esp + 0xc0], ecx
mov dword [esp + 0xc4], eax
lea edi, [esp + 0xd8]
xor eax, eax
call fcn.00468aaa
lea ecx, [0x501370]
mov dword [esp + 0xd8], ecx
mov dword [esp + 0xe0], 0x24
lea ecx, [0x550231]
mov dword [esp + 0xdc], ecx
mov dword [esp + 0xe8], 1
mov dword [esp + 0xec], 1
lea ecx, [esp + 0xc0]
mov dword [esp + 0xe4], ecx
mov ecx, dword [0x68b9c4]
mov dword [esp], ecx
mov dword [esp + 4], 0
mov dword [esp + 8], 2
lea ecx, [esp + 0xd8]
mov dword [esp + 0xc], ecx
call fcn.004b1180
mov edx, dword [esp + 0x160]
mov esi, dword [esp + 0x78]
mov eax, edx
mov edx, dword [esp + 0x94]
mov ebx, dword [esp + 0x5c]
mov edi, dword [esp + 0x58]
jmp 0x5007e0
call fcn.00467460
jmp fcn.005005e0