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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x652c5b
mov eax, dword fs:[0]
push eax
sub esp, 0x60
mov eax, dword [0x6a9fa4]
xor eax, esp
mov dword [esp + 0x58], eax
push ebx
push esi
push edi
mov eax, dword [0x6a9fa4]
xor eax, esp
push eax
lea eax, [esp + 0x70]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esi + 0xa0]
test eax, eax
mov dword [esp + 0x48], esi
jne 0x54096f
xor ebx, ebx
mov dword [esp + 0x1c], ebx
jmp 0x540990
mov ecx, dword [esi + 0xa4]
sub ecx, eax
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x1c], eax
mov ebx, eax
xor ecx, ecx
mov eax, ebx
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00612a1b
mov dword [esp + 0x1c], eax
xor ecx, ecx
add esp, 4
mov eax, ebx
mov edx, 0x1c
mul edx
seto cl
neg ecx
or ecx, eax
xor eax, eax
add ecx, 4
setb al
neg eax
or eax, ecx
push eax
call fcn.00612a1b
add esp, 4
mov dword [esp + 0x24], eax
xor ecx, ecx
cmp eax, ecx
mov dword [esp + 0x78], ecx
je 0x540a02
push fcn.00404db0
push fcn.00404d50
push ebx
lea edi, [eax + 4]
push 0x1c
push edi
mov dword [eax], ebx
call fcn.00625db4
mov dword [esp + 0x20], edi
jmp 0x540a06
mov dword [esp + 0x20], ecx
xor ecx, ecx
xor edi, edi
cmp ebx, ecx
mov dword [esp + 0x78], 0xffffffff
jle 0x540a7c
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x14], ecx
mov edi, edi
mov edx, dword [esp + 0x18]
mov dword [edx + edi*4], edi
mov eax, dword [esi]
mov edx, dword [eax + 0x118]
push edi
lea ecx, [esp + 0x50]
push ecx
mov ecx, esi
call edx
mov ecx, dword [esp + 0x14]
push 0xffffffffffffffff
push 0
push eax
mov dword [esp + 0x84], 1
call fcn.00404e90
mov dword [esp + 0x78], 0xffffffff
cmp dword [esp + 0x64], 8
jb 0x540a6e
mov eax, dword [esp + 0x50]
push eax
call fcn.0062414c
add esp, 4
add dword [esp + 0x14], 0x1c
add edi, 1
cmp edi, ebx
jl 0x540a20
xor ecx, ecx
cmp ebx, 1
jle 0x540b79
lea edx, [ebx - 1]
add ebx, 0xffffffff
mov dword [esp + 0x14], edx
mov dword [esp + 0x24], ebx
xor ebx, ebx
cmp dword [esp + 0x14], ecx
jle 0x540b66
mov esi, dword [esp + 0x20]
add esi, 0x20
cmp dword [esi + 0x14], 8
mov edi, dword [esi + 0x10]
jb 0x540ab3
mov eax, dword [esi]
jmp 0x540ab5
mov eax, esi
push eax
mov eax, dword [esi - 0xc]
lea ecx, [esi - 0x20]
call fcn.004597e0
cmp byte [ebp + 8], 0
je 0x540ad0
test eax, eax
jg 0x540ad4
jmp 0x540b50
test eax, eax
jge 0x540b50
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + ebx*4]
mov edx, dword [eax + ebx*4 + 4]
mov dword [eax + ebx*4 + 4], ecx
mov dword [eax + ebx*4], edx
xor eax, eax
push 0xffffffffffffffff
push eax
mov dword [esp + 0x68], eax
mov word [esp + 0x58], ax
lea eax, [esi - 0x20]
push eax
lea ecx, [esp + 0x58]
mov dword [esp + 0x70], 7
call fcn.00404e90
push 0xffffffffffffffff
push 0
lea edi, [esi - 4]
push edi
lea ecx, [esi - 0x20]
mov dword [esp + 0x84], 2
call fcn.00404e90
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x54]
push eax
mov ecx, edi
call fcn.00404e90
mov dword [esp + 0x78], 0xffffffff
cmp dword [esp + 0x64], 8
jb 0x540b50
mov ecx, dword [esp + 0x50]
push ecx
call fcn.0062414c
add esp, 4
add ebx, 1
add esi, 0x1c
cmp ebx, dword [esp + 0x14]
jl 0x540aa6
mov esi, dword [esp + 0x48]
xor ecx, ecx
mov eax, 1
sub dword [esp + 0x14], eax
sub dword [esp + 0x24], eax
jne 0x540a93
mov edi, esi
mov esi, dword [esi + 0xdc]
cmp esi, ecx
je 0x540ba2
mov eax, esi
jmp 0x540b90
mov edi, eax
mov eax, dword [edi + 0xdc]
cmp eax, ecx
jne 0x540b90
jmp 0x540ba2
xor ecx, ecx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x78], 3
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], ecx
xor ebx, ebx
cmp dword [esp + 0x1c], ecx
mov byte [esp + 0x78], 4
mov dword [esp + 0x14], ebx
jle 0x540c81
jmp 0x540be4
mov ebx, dword [esp + 0x14]
mov eax, dword [edi + 0xa0]
test eax, eax
mov edx, dword [esp + 0x18]
mov esi, dword [edx + ebx*4]
je 0x540c14
mov ecx, dword [edi + 0xa4]
sub ecx, eax
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp esi, eax
jb 0x540c19
call fcn.0062472f
mov ecx, dword [edi + 0xa0]
lea eax, [esi*8]
sub eax, esi
lea edx, [ecx + eax*4]
push edx
lea esi, [esp + 0x2c]
call fcn.0051f100
mov ecx, dword [edi + 0xb0]
test ecx, ecx
mov eax, dword [esp + 0x18]
mov ebx, dword [eax + ebx*4]
je 0x540c55
mov eax, dword [edi + 0xb4]
sub eax, ecx
sar eax, 4
cmp ebx, eax
jb 0x540c5a
call fcn.0062472f
shl ebx, 4
add ebx, dword [edi + 0xb0]
lea esi, [esp + 0x38]
call fcn.00546f70
mov eax, dword [esp + 0x14]
add eax, 1
cmp eax, dword [esp + 0x1c]
mov dword [esp + 0x14], eax
jl 0x540be0
lea ecx, [edi + 0x9c]
push ecx
lea ebx, [esp + 0x2c]
call fcn.005471e0
lea edx, [esp + 0x38]
push edx
lea eax, [edi + 0xac]
call fcn.00546e00
mov eax, dword [edi]
mov edx, dword [eax + 0x44]
mov ecx, edi
call edx
mov eax, dword [esp + 0x3c]
mov edi, dword [edi + 0xe0]
xor ebx, ebx
cmp eax, ebx
je 0x540cc3
push eax
call fcn.0062414c
add esp, 4
mov dword [esp + 0x78], 0xffffffff
mov eax, dword [esp + 0x2c]
cmp eax, ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
je 0x540d29
mov esi, dword [esp + 0x30]
cmp eax, esi
je 0x540d20
lea ebx, [eax + 0x18]
lea ebx, [ebx]
cmp dword [ebx], 8
jb 0x540d01
mov eax, dword [ebx - 0x14]
push eax
call fcn.0062414c
add esp, 4
xor eax, eax
mov dword [ebx], 7
mov dword [ebx - 4], eax
mov word [ebx - 0x14], ax
add ebx, 0x1c
lea ecx, [ebx - 0x18]
cmp ecx, esi
jne 0x540cf0
mov eax, dword [esp + 0x2c]
xor ebx, ebx
push eax
call fcn.0062414c
add esp, 4
cmp edi, ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
jne 0x540ba0
mov edx, dword [esp + 0x18]
push edx
call fcn.00624291
mov eax, dword [esp + 0x24]
add esp, 4
test eax, eax
je 0x540d6f
mov ecx, dword [eax - 4]
lea esi, [eax - 4]
push fcn.00404db0
push ecx
push 0x1c
push eax
call fcn.00625fad
push esi
call fcn.00624291
add esp, 4
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x58]
xor ecx, esp
call fcn.00626d59
mov esp, ebp
pop ebp
ret 4