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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
lea eax, [esp - 0x2c]
cmp eax, dword [ecx + 8]
jbe 0x5826f0
sub esp, 0xac
mov eax, dword [esp + 0xb4]
test eax, eax
jne 0x5826dd
mov eax, 3
lea ecx, [0x60b475]
mov dword [esp + 0xb4], eax
mov dword [esp + 0xb0], ecx
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.00581ef0
movzx eax, byte [esp + 8]
test al, al
je 0x58263b
mov edx, dword [0x732c80]
mov eax, dword [esp + 0xb8]
mov dword [esp], eax
mov eax, dword [esp + 0xbc]
mov dword [esp + 4], eax
mov eax, dword [edx]
call eax
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov ebx, dword [esp + 0x10]
test ecx, ecx
jne 0x58261b
mov dword [esp + 0x28], eax
lea eax, [0x5dac00]
mov dword [esp], eax
mov eax, dword [esp + 0xc0]
mov dword [esp + 4], eax
mov ecx, dword [esp + 0xc4]
mov dword [esp + 8], ecx
call fcn.0040bb50
movzx eax, byte [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
test al, al
je 0x5825d2
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], ecx
mov eax, dword [esp + 0x28]
mov ebx, dword [eax + 0x18]
mov ebp, dword [eax + 0x14]
mov dword [esp], ebp
mov dword [esp + 4], ebx
call fcn.00580810
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 0x28]
mov dword [edx + 0x18], eax
mov eax, dword [0x749b10]
lea ebx, [edx + 0x14]
test eax, eax
jne 0x5825c1
mov dword [edx + 0x14], ecx
call fcn.00405d10
mov eax, dword [esp]
mov dword [esp + 0x64], eax
lea ecx, [0x600e80]
mov dword [esp], ecx
call fcn.0040dcf0
mov eax, dword [esp + 4]
mov dword [esp + 0x30], eax
mov ecx, dword [esp + 0xb4]
mov dword [eax + 4], ecx
mov ecx, dword [0x749b10]
lea edx, [eax + 8]
test ecx, ecx
jne 0x582589
mov ecx, dword [esp + 0xb0]
mov dword [eax], ecx
mov ecx, dword [esp + 0x28]
mov dword [eax + 8], ecx
mov dword [eax + 0x10], 8
mov edx, dword [0x749b10]
lea ebx, [eax + 0xc]
test edx, edx
jne 0x58256a
lea edx, [0x60c070]
mov dword [eax + 0xc], edx
mov dword [eax + 0x14], 1
mov dword [eax + 0x18], 1
mov edx, dword [0x749b10]
lea ebx, [eax + 0x1c]
test edx, edx
jne 0x58254d
mov edx, dword [esp + 0x64]
mov dword [eax + 0x1c], edx
mov edx, dword [esp + 0x34]
mov dword [eax + 0x20], edx
mov edx, dword [0x749b10]
lea ebx, [eax + 0x24]
mov dword [esp + 0x60], ebx
test edx, edx
jne 0x58252c
mov edx, dword [esp + 0x38]
mov dword [eax + 0x24], edx
mov edx, dword [ecx + 0x14]
mov ecx, dword [ecx + 0x18]
mov dword [eax + 0x48], ecx
mov ecx, dword [0x749b10]
lea ebp, [eax + 0x44]
test ecx, ecx
jne 0x582513
mov dword [eax + 0x44], edx
mov ecx, dword [esp + 0xc0]
test ecx, ecx
je 0x58250c
je 0x5824e7
mov edx, dword [ecx + 8]
cmp edx, 0x4128187d
jne 0x5822f8
lea ebp, [0x63d3a0]
cmp ebp, ecx
jne 0x582502
mov ebp, dword [esp + 0xc4]
jne 0x5822f8
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov ebx, dword [ebp + 4]
mov dword [esp + 0x24], ebx
cmp ecx, ebx
mov edi, ebp
xchg ebp, ebx
setae bl
xchg ebp, ebx
sar ebx, 0x1f
cmp edx, ebx
sete al
and eax, ebp
cmp edx, ebx
setg dl
or edx, eax
test dl, dl
je 0x5822eb
xor eax, eax
mov ecx, dword [esp + 0x30]
mov dword [ecx + 0x2c], eax
sar eax, 0x1f
mov dword [ecx + 0x30], eax
mov eax, edi
lea edi, [esp + 0x80]
mov esi, eax
call fcn.0044c3be
lea eax, [0x5d8820]
mov dword [esp], eax
call fcn.0040dcf0
mov eax, dword [esp + 4]
lea ecx, [0x5933f0]
mov dword [eax], ecx
mov ecx, dword [esp + 0x30]
lea edx, [ecx + 0x28]
mov ebx, dword [0x749b10]
lea edi, [eax + 4]
test ebx, ebx
jne 0x5822a9
lea esi, [esp + 0x80]
call fcn.0044c3be
mov ecx, dword [esp + 0x30]
mov dword [ecx + 0x28], eax
mov eax, dword [ecx + 0x28]
lea edx, [ecx + 0x28]
test eax, eax
je 0x58224f
mov eax, dword [ecx + 0x30]
mov ebx, dword [ecx + 0x2c]
test ebx, ebx
sete bl
test eax, eax
sete al
and eax, ebx
test al, al
je 0x58224f
lea eax, [0x63e6e0]
mov dword [ecx + 0x20], eax
mov eax, dword [0x749b10]
test eax, eax
jne 0x582273
lea eax, [0x7499c4]
mov dword [ecx + 0x24], eax
lea eax, [0x61e9b0]
mov dword [ecx + 0x28], eax
mov dword [esp + 0xc8], ecx
mov dword [esp + 0xcc], 0
mov dword [esp + 0xd0], 0
add esp, 0xac
ret
mov dword [esp + 0x5c], edx
mov eax, dword [esp + 0x60]
mov dword [esp], eax
lea eax, [0x7499c4]
mov dword [esp + 4], eax
call fcn.0040e560
mov eax, dword [esp + 0x5c]
mov dword [esp], eax
lea eax, [0x61e9b0]
mov dword [esp + 4], eax
call fcn.0040e560
mov ecx, dword [esp + 0x30]
jmp 0x58224f
mov dword [esp + 0x58], eax
mov dword [esp + 0x54], edx
lea eax, [0x5e8300]
mov dword [esp], eax
mov dword [esp + 4], edi
lea eax, [esp + 0x80]
mov dword [esp + 8], eax
call fcn.0040e670
mov eax, dword [esp + 0x54]
mov dword [esp], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 4], eax
call fcn.0040e560
mov ecx, dword [esp + 0x30]
jmp 0x58220a
mov edx, dword [esp + 0x24]
sub edx, ecx
mov eax, edx
jmp 0x5821a8
cmp edx, 0xa5164854
jne 0x582400
lea ebp, [0x63cf40]
cmp ebp, ecx
jne 0x5824f8
mov ebp, dword [esp + 0xc4]
jne 0x582400
mov dword [esp + 0x2c], ebp
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
mov ebx, dword [ebp + 4]
mov edi, ebx
sar ebx, 0x1f
cmp ecx, edi
xchg ebp, ebx
setae bl
xchg ebp, ebx
cmp edx, ebx
sete al
and eax, ebp
cmp edx, ebx
setg dl
or edx, eax
test dl, dl
je 0x5823f7
xor eax, eax
mov ecx, dword [esp + 0x30]
mov dword [ecx + 0x2c], eax
sar eax, 0x1f
mov dword [ecx + 0x30], eax
lea edi, [esp + 0x94]
mov esi, dword [esp + 0x2c]
call fcn.0044c3b4
lea eax, [0x5d87c0]
mov dword [esp], eax
call fcn.0040dcf0
mov eax, dword [esp + 4]
lea ecx, [0x593330]
mov dword [eax], ecx
mov ecx, dword [esp + 0x30]
lea edx, [ecx + 0x28]
mov ebx, dword [0x749b10]
lea edi, [eax + 4]
test ebx, ebx
jne 0x5823b5
lea esi, [esp + 0x94]
call fcn.0044c3b4
mov ecx, dword [esp + 0x30]
mov dword [ecx + 0x28], eax
jmp 0x58220a
mov dword [esp + 0x50], eax
mov dword [esp + 0x4c], edx
lea eax, [0x5e6100]
mov dword [esp], eax
mov dword [esp + 4], edi
lea eax, [esp + 0x94]
mov dword [esp + 8], eax
call fcn.0040e670
mov eax, dword [esp + 0x4c]
mov dword [esp], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 4], eax
call fcn.0040e560
mov ecx, dword [esp + 0x30]
jmp 0x58220a
sub edi, ecx
mov eax, edi
jmp 0x582352
cmp edx, 0xe763bb76
jne 0x5824e7
lea edx, [0x63cf00]
cmp edx, ecx
jne 0x5824ee
mov ecx, dword [esp + 0xc4]
jne 0x5824e7
mov edx, dword [ecx + 0xc]
mov ebp, dword [ecx + 4]
sub ebp, edx
mov dword [eax + 0x2c], ebp
sar ebp, 0x1f
mov dword [eax + 0x30], ebp
mov edx, dword [ecx]
mov ebp, dword [ecx + 0xc]
mov esi, dword [ecx + 4]
mov ecx, dword [ecx + 8]
cmp ebp, esi
ja 0x5826e9
mov dword [esp + 0x48], edx
mov dword [esp + 0x24], ebp
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], ecx
lea eax, [0x5d84c0]
mov dword [esp], eax
call fcn.0040dcf0
mov eax, dword [esp + 4]
lea ecx, [0x593240]
mov dword [eax], ecx
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
sub ecx, edx
mov dword [eax + 8], ecx
mov ecx, dword [esp + 0x1c]
sub ecx, edx
mov dword [eax + 0xc], ecx
mov ebx, dword [esp + 0x30]
lea ebp, [ebx + 0x28]
mov esi, dword [0x749b10]
lea edi, [eax + 4]
neg ecx
sar ecx, 0x1f
and edx, ecx
mov ecx, dword [esp + 0x48]
add ecx, edx
test esi, esi
jne 0x5824b9
mov dword [eax + 4], ecx
mov dword [ebx + 0x28], eax
mov ecx, ebx
jmp 0x58220a
mov dword [esp + 0x44], eax
mov dword [esp + 0x40], ebp
mov dword [esp], edi
mov dword [esp + 4], ecx
call fcn.0040e560
mov eax, dword [esp + 0x40]
mov dword [esp], eax
mov eax, dword [esp + 0x44]
mov dword [esp + 4], eax
call fcn.0040e560
mov ebx, dword [esp + 0x30]
jmp 0x5824b2
mov ecx, eax
jmp 0x58220a
mov ecx, 0
jmp 0x582421
mov ebp, 0
jmp 0x582319
mov ebp, 0
jmp 0x58216f
mov ecx, eax
jmp 0x58224f
mov dword [esp], ebp
mov dword [esp + 4], edx
call fcn.0040e560
mov eax, dword [esp + 0x30]
mov ebx, dword [esp + 0x60]
jmp 0x582136
mov dword [esp], ebx
mov eax, dword [esp + 0x38]
mov dword [esp + 4], eax
call fcn.0040e560
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x28]
mov ebx, dword [esp + 0x60]
jmp 0x582119
mov dword [esp], ebx
mov eax, dword [esp + 0x64]
mov dword [esp + 4], eax
call fcn.0040e560
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x28]
jmp 0x5820f6
mov dword [esp], ebx
lea eax, [0x60c070]
mov dword [esp + 4], eax
call fcn.0040e560
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x28]
jmp 0x5820d0
mov dword [esp + 0x3c], edx
mov dword [esp], eax
mov ecx, dword [esp + 0xb0]
mov dword [esp + 4], ecx
call fcn.0040e560
mov eax, dword [esp + 0x3c]
mov dword [esp], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 4], eax
call fcn.0040e560
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x28]
jmp 0x5820af
mov dword [esp], ebx
mov dword [esp + 4], ecx
call fcn.0040e560
jmp 0x582062
mov eax, dword [esp + 0xc0]
test eax, eax
je 0x582021
mov dword [esp + 0x6c], 0
mov dword [esp + 0x68], eax
mov ecx, dword [esp + 0xc4]
mov dword [esp + 0x6c], ecx
lea edx, [0x63e660]
mov dword [esp], edx
lea edx, [esp + 0x68]
mov dword [esp + 4], edx
call fcn.0040b710
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 8]
jmp 0x582021
mov dword [esp + 0xc8], 0
mov dword [esp + 0xcc], ecx
mov dword [esp + 0xd0], ebx
add esp, 0xac
ret
mov eax, dword [esp + 0xb0]
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0xb4]
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 0
lea eax, [0x5cff80]
mov dword [esp], eax
lea eax, [esp + 0x70]
mov dword [esp + 4], eax
call fcn.0040b580
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], ecx
lea eax, [0x612409]
mov dword [esp], eax
mov dword [esp + 4], 0x1b
lea eax, [esp + 0x78]
mov dword [esp + 8], eax
mov dword [esp + 0xc], 1
mov dword [esp + 0x10], 1
call fcn.0049fd40
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0xc8], 0
mov dword [esp + 0xcc], ecx
mov dword [esp + 0xd0], eax
add esp, 0xac
ret
mov ecx, dword [esp + 0xb0]
jmp 0x581f8a
call fcn.00425870
ud2
call fcn.0044a470
jmp fcn.00581f50