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

Disassembly:
sub esp, 0x64
push ebx
push ebp
push esi
push edi
movsx ebp, word [esp + 0x78]
or eax, 0xffffffff
mov esi, ebp
imul esi, esi, 0x678
add esi, 0x717030
mov word [esi + 2], ax
mov word [esi + 4], ax
xor ebx, ebx
mov dword [esi + 0x84], eax
test cl, 2
mov eax, ebx
setne al
mov dl, cl
and dl, 4
mov word [esi + 0x38], cx
mov byte [esi + 8], bl
mov dword [esi + 0x88], ebx
mov dword [esi + 0x8c], ebx
inc eax
mov word [esp + 0x16], ax
mov eax, dword [esp + 0x16]
add eax, eax
neg dl
mov word [esp + 0x20], ax
movzx eax, ax
mov word [esi], bx
mov byte [esi + 9], bl
sbb edx, edx
and edx, 0x5622
add edx, 0x5622
imul eax, edx
mov dword [esp + 0x18], edx
xor edx, edx
mov dword [esp + 0x50], edx
mov dword [esp + 0x54], edx
mov dword [esp + 0x58], edx
mov dword [esp + 0x5c], edx
mov dword [esp + 0x60], edx
mov dword [esp + 0x1c], eax
lea eax, [eax + eax*2]
mov dword [esp + 0x64], edx
mov dword [esi + 0x68], eax
mov dword [esp + 0x58], eax
lea eax, [esp + 0x14]
mov dword [esp + 0x68], edx
mov dword [esp + 0x6c], edx
mov dword [esp + 0x60], eax
mov al, byte [0x737d21]
cmp al, bl
mov dword [esp + 0x70], edx
mov dl, byte [0x737d20]
mov word [esp + 0x14], 1
mov word [esp + 0x22], 0x10
mov dword [esp + 0x50], 0x24
mov dword [esp + 0x54], 0x100a0
je 0x54226b
cmp dl, bl
jne 0x542273
mov dword [esp + 0x54], 0x100a8
and ecx, 1
mov dword [esp + 0x10], ecx
je 0x542330
cmp dword [0x737d2c], 3
mov ecx, dword [esp + 0x54]
jne 0x542295
or ecx, 0x210
jmp 0x542298
or ecx, 0x10
cmp al, bl
mov dword [esp + 0x54], ecx
je 0x5422a4
cmp dl, bl
jne 0x5422cb
mov ecx, dword [0x64929c]
mov edx, dword [0x6492a0]
mov eax, dword [0x6492a4]
mov dword [esp + 0x64], ecx
mov ecx, dword [0x6492a8]
mov dword [esp + 0x68], edx
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], ecx
mov eax, dword [0x737d0c]
mov edx, dword [eax]
push ebx
lea edi, [esi + 0x670]
push edi
lea ecx, [esp + 0x58]
push ecx
push eax
call dword [edx + 0xc]
test eax, eax
jl 0x542326
mov eax, dword [edi]
xor edx, edx
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], edx
lea edx, [esp + 0x24]
push edx
mov dword [esp + 0x28], 0x14
mov ecx, dword [eax]
push eax
call dword [ecx + 0xc]
cmp eax, ebx
jl 0x542326
test byte [esp + 0x28], 4
je 0x542348
inc word [0x737d24]
jmp 0x542348
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x64
ret
mov eax, dword [0x737d0c]
mov ecx, dword [eax]
push ebx
lea edi, [esi + 0x670]
push edi
lea edx, [esp + 0x58]
push edx
push eax
call dword [ecx + 0xc]
cmp eax, ebx
jl 0x542470
cmp word [esp + 0x10], bx
je 0x542426
mov edi, dword [edi]
mov ecx, dword [edi]
lea eax, [esi + 0x674]
push eax
push 0x6492bc
push edi
mov dword [esp + 0x1c], eax
call dword [ecx]
test eax, eax
jl 0x54241e
mov edx, dword [0x690508]
xor eax, eax
cmp word [0x737d30], bx
mov ecx, 0xb
lea edi, [esp + 0x24]
rep stosd dword es:[edi], eax
mov eax, dword [edx]
mov ecx, dword [edx + 4]
mov edx, dword [edx + 8]
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], edx
jne 0x5423d3
mov eax, dword [esp + 0x78]
mov edi, esi
mov word [0x737d30], 2
call fcn.0054cc60
cmp eax, 0xffffffff
mov dword [0x737d2c], eax
je 0x5423d3
mov word [0x737d30], 1
jmp 0x5423dd
cmp word [0x737d30], 1
jne 0x542404
mov ax, word [esp + 0x78]
cmp ax, word [0x737d24]
jge 0x542404
mov edx, ebp
call fcn.0054ce50
test eax, eax
jne 0x542404
call fcn.0054ce10
mov word [0x737d30], 2
mov ecx, dword [esp + 0x78]
push ebx
push ebx
push ebx
push ecx
lea edi, [esp + 0x34]
xor bl, bl
call fcn.00542cf0
add esp, 0x10
xor ebx, ebx
jmp 0x54242c
mov edx, dword [esp + 0x10]
mov dword [edx], ebx
jmp 0x54242c
mov dword [esi + 0x674], ebx
mov ecx, dword [esp + 0x78]
xor eax, eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
push ebx
push ecx
lea edi, [esp + 0x2c]
mov dword [esp + 0x48], eax
mov dword [esp + 0x2c], 0x3f800000
mov dword [esp + 0x30], 0x3f800000
call fcn.00542f50
add esp, 8
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x64
ret