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

Disassembly:
mov ecx, dword [0x6c4e70]
mov ecx, dword fs:[ecx]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x541032
sub esp, 0x60
mov eax, dword [esp + 0x6c]
cmp eax, 0xa
jge 0x540cc5
mov eax, 0xa
mov dword [esp + 0x44], eax
nop
mov ecx, dword [esp + 0x64]
mov dword [esp], ecx
mov ecx, dword [esp + 0x68]
mov dword [esp + 4], ecx
lea ecx, [0x5bef98]
mov dword [esp + 8], ecx
mov dword [esp + 0xc], 1
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0xffffffff
call fcn.004be180
mov eax, dword [esp + 0x18]
mov dword [esp + 0x48], eax
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x24], ecx
xor edx, edx
xor ebx, ebx
xor ebp, ebp
jmp 0x540d4b
mov dword [esp], 0
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
mov dword [esp + 0xc], ebp
mov dword [esp + 0x10], ebx
call fcn.0044cfa0
mov eax, dword [esp + 0x40]
lea edx, [eax + 1]
mov ebp, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x24]
cmp edx, ecx
jge 0x540e92
mov dword [esp + 0x40], edx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x54], ebp
lea ecx, [eax + edx*8]
mov ebx, dword [ecx]
mov ecx, dword [ecx + 4]
mov dword [esp], ebx
mov dword [esp + 4], ecx
call fcn.004bf850
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x44]
xor ebx, ebx
xor ebp, ebp
jmp 0x540f41
test ecx, ecx
je 0x540dfe
test ebx, ebx
je 0x540dd6
mov dword [esp], 0
mov dword [esp + 4], ebp
mov dword [esp + 8], ebx
lea eax, [0x5bef98]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], 1
mov ecx, dword [esp + 0x70]
mov dword [esp + 0x14], ecx
mov edx, dword [esp + 0x74]
mov dword [esp + 0x18], edx
call fcn.0044d040
mov ebp, dword [esp + 0x1c]
mov ebx, dword [esp + 0x20]
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x38]
mov dword [esp], 0
mov dword [esp + 4], ebp
mov dword [esp + 8], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], ecx
call fcn.0044cfa0
mov ebp, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x30]
test eax, eax
jne 0x540e0f
mov ecx, dword [esp + 0x54]
jmp 0x540d18
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x5c], ebp
mov dword [esp], 0
mov ecx, dword [esp + 0x54]
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
lea eax, [0x5bef98]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], 1
call fcn.0044cfa0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x3c]
test edx, edx
je 0x540e81
mov dword [esp], 0
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
mov eax, dword [esp + 0x70]
mov dword [esp + 0xc], eax
mov ecx, dword [esp + 0x74]
mov dword [esp + 0x10], ecx
call fcn.0044cfa0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x3c]
mov ebx, edx
mov ebp, dword [esp + 0x5c]
mov esi, eax
mov eax, ecx
mov ecx, esi
jmp 0x540d18
mov dword [esp + 0x78], ebp
mov dword [esp + 0x7c], ebx
add esp, 0x60
ret
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x5c], esi
mov ecx, dword [esp + 0x58]
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.004bf850
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov dword [esp], 0
mov edx, dword [esp + 0x5c]
mov dword [esp + 4], edx
mov edx, dword [esp + 0x3c]
mov dword [esp + 8], edx
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], ecx
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x18], eax
call fcn.0044d040
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
sub eax, ecx
mov edx, eax
neg eax
sar eax, 0x1f
and ecx, eax
mov eax, dword [esp + 0x58]
add eax, ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x5c], ecx
mov ebx, dword [esp + 0x20]
mov dword [esp + 0x3c], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.004bf850
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x44]
mov ebx, dword [esp + 0x5c]
mov ebp, dword [esp + 0x3c]
mov ebx, ebp
mov ebp, dword [esp + 0x5c]
mov dword [esp + 0x58], eax
mov dword [esp + 0x38], ecx
cmp edx, ecx
jge 0x540d88
ja 0x541026
mov dword [esp + 0x50], ebp
mov dword [esp + 0x2c], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
lea ecx, [0x5bfca0]
mov dword [esp + 8], ecx
mov dword [esp + 0xc], 1
call fcn.004bdd90
mov eax, dword [esp + 0x10]
test eax, eax
jge 0x540f99
mov ebx, dword [esp + 0x44]
lea eax, [ebx - 1]
mov ecx, 2
lea edx, [0x586397]
jmp 0x540fa1
mov ebx, dword [esp + 0x44]
xor ecx, ecx
xor edx, edx
mov dword [esp + 0x4c], edx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x34], eax
mov ebp, dword [esp + 0x2c]
test ebp, ebp
jne 0x540fbb
mov esi, dword [esp + 0x50]
jmp 0x541011
mov dword [esp], 0
mov eax, dword [esp + 0x50]
mov dword [esp + 4], eax
mov dword [esp + 8], ebp
lea eax, [0x5bef98]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], 1
mov ecx, dword [esp + 0x70]
mov dword [esp + 0x14], ecx
mov edx, dword [esp + 0x74]
mov dword [esp + 0x18], edx
call fcn.0044d040
mov ebp, dword [esp + 0x1c]
mov ebx, dword [esp + 0x20]
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x4c]
mov esi, ebp
mov ebp, ebx
mov ebx, dword [esp + 0x44]
mov edi, dword [esp + 0x38]
cmp eax, edi
jbe 0x540e9e
mov ecx, eax
mov edx, edi
call fcn.00460f80
mov eax, ecx
mov ecx, edx
mov edx, eax
call fcn.00460f80
nop
call fcn.0045faf0
jmp fcn.00540ca0