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

Disassembly:
sub esp, 0x68
push esi
mov esi, dword [esp + 0x7c]
cmp esi, 0xa
jae 0x540e47
mov eax, 0xffffffec
pop esi
add esp, 0x68
ret
mov edx, dword [esp + 0x70]
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x78]
add eax, edx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x80]
push ebx
push ebp
push edi
mov ebp, dword [eax]
lea ebx, [eax + 4]
movzx eax, word [ecx]
movzx edi, word [ecx + 2]
mov dword [esp + 0x88], eax
movzx eax, word [ecx + 4]
mov dword [esp + 0x1c], eax
lea eax, [ecx + 6]
mov ecx, dword [esp + 0x88]
mov dword [esp + 0x2c], eax
add eax, ecx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x80]
add eax, 3
mov dword [esp + 0x14], edi
shr eax, 2
add edx, eax
mov dword [esp + 0x34], edx
mov dword [esp + 0x10], edx
lea edi, [edx + eax]
add eax, edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], eax
mov dword [esp + 0x88], edi
mov edi, eax
mov eax, esi
sub eax, dword [esp + 0x1c]
sub eax, dword [esp + 0x14]
sub eax, ecx
sub eax, 6
mov dword [esp + 0x30], eax
cmp eax, esi
ja 0x5410bb
push ecx
push dword [esp + 0x30]
lea eax, [esp + 0x70]
push eax
call fcn.0053fd10
add esp, 0xc
cmp eax, 0xffffff88
ja 0x541157
push dword [esp + 0x14]
lea eax, [esp + 0x5c]
push dword [esp + 0x1c]
push eax
call fcn.0053fd10
add esp, 0xc
cmp eax, 0xffffff88
ja 0x541157
mov eax, dword [esp + 0x18]
add eax, dword [esp + 0x14]
mov esi, dword [esp + 0x1c]
push esi
push eax
lea eax, [esp + 0x50]
push eax
call fcn.0053fd10
add esp, 0xc
cmp eax, 0xffffff88
ja 0x541157
mov eax, dword [esp + 0x18]
add eax, dword [esp + 0x14]
push dword [esp + 0x30]
add eax, esi
push eax
lea eax, [esp + 0x40]
push eax
call fcn.0053fd10
add esp, 0xc
cmp eax, 0xffffff88
ja 0x541157
lea eax, [esp + 0x38]
push eax
call fcn.0053c0e0
mov esi, eax
lea eax, [esp + 0x4c]
push eax
call fcn.0053c0e0
or esi, eax
lea eax, [esp + 0x60]
push eax
call fcn.0053c0e0
or esi, eax
lea eax, [esp + 0x74]
push eax
call fcn.0053c0e0
add esp, 0x10
or esi, eax
jne 0x541098
mov eax, dword [esp + 0x28]
add eax, 0xfffffff9
mov dword [esp + 0x30], eax
cmp edi, eax
jae 0x541098
mov esi, dword [esp + 0x7c]
lea eax, [esp + 0x68]
push ebp
push ebx
push eax
push esi
call fcn.005407c0
push ebp
add esi, eax
lea eax, [esp + 0x6c]
push ebx
push eax
push dword [esp + 0x2c]
call fcn.005407c0
add dword [esp + 0x30], eax
lea eax, [esp + 0x68]
push ebp
push ebx
push eax
push dword [esp + 0xb4]
call fcn.005407c0
add dword [esp + 0xb8], eax
lea eax, [esp + 0x68]
push ebp
push ebx
push eax
push edi
call fcn.005407c0
add esp, 0x40
add edi, eax
lea eax, [esp + 0x68]
push ebp
push ebx
push eax
push esi
call fcn.005407c0
add esi, eax
lea eax, [esp + 0x68]
push ebp
push ebx
push eax
mov dword [esp + 0x98], esi
mov esi, dword [esp + 0x2c]
push esi
call fcn.005407c0
add esi, eax
lea eax, [esp + 0x68]
push ebp
push ebx
push eax
mov dword [esp + 0x3c], esi
mov esi, dword [esp + 0xb4]
push esi
call fcn.005407c0
push ebp
add esi, eax
lea eax, [esp + 0x6c]
push ebx
push eax
push edi
mov dword [esp + 0xc8], esi
call fcn.005407c0
add esp, 0x40
add edi, eax
lea eax, [esp + 0x38]
push eax
call fcn.0053c0e0
mov esi, eax
lea eax, [esp + 0x4c]
push eax
call fcn.0053c0e0
or esi, eax
lea eax, [esp + 0x60]
push eax
call fcn.0053c0e0
or esi, eax
lea eax, [esp + 0x74]
push eax
call fcn.0053c0e0
add esp, 0x10
or esi, eax
mov eax, dword [esp + 0x30]
je 0x540fa4
mov eax, dword [esp + 0x7c]
mov ecx, dword [esp + 0x34]
cmp eax, ecx
ja 0x5410bb
mov esi, dword [esp + 0x10]
cmp esi, dword [esp + 0x20]
ja 0x5410bb
mov edx, dword [esp + 0x24]
cmp dword [esp + 0x88], edx
jbe 0x5410c8
pop edi
pop ebp
pop ebx
mov eax, 0xffffffec
pop esi
add esp, 0x68
ret
push ebp
push ebx
push ecx
lea ecx, [esp + 0x74]
push ecx
push eax
call fcn.0053cee0
push ebp
push ebx
push dword [esp + 0x3c]
lea eax, [esp + 0x78]
push eax
push esi
call fcn.0053cee0
push ebp
push ebx
push dword [esp + 0x54]
lea eax, [esp + 0x7c]
push eax
push dword [esp + 0xc0]
call fcn.0053cee0
push ebp
push ebx
push dword [esp + 0x6c]
lea eax, [esp + 0x80]
push eax
push edi
call fcn.0053cee0
add esp, 0x50
lea eax, [esp + 0x38]
push eax
call fcn.00543460
mov edx, eax
lea eax, [esp + 0x4c]
push eax
call fcn.00543460
and edx, eax
lea eax, [esp + 0x60]
push eax
call fcn.00543460
and edx, eax
lea eax, [esp + 0x74]
push eax
call fcn.00543460
add esp, 0x10
mov ecx, 0xffffffec
test eax, edx
mov eax, dword [esp + 0x80]
cmove eax, ecx
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x68
ret