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

Disassembly:
sub esp, 0x50
mov eax, dword [0x588e74]
xor eax, esp
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x60]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x2c], ecx
push ebx
mov ebx, 5
push ebp
mov ebp, dword [esp + 0x5c]
mov dword [esp + 0xc], ebp
push esi
push edi
mov edi, dword [esp + 0x68]
mov dword [esp + 0x44], edi
test eax, eax
je 0x504831
mov dword [eax], 0
test ecx, ecx
je 0x50483b
mov dword [ecx], 0
xor esi, esi
mov dword [esp + 0x2c], esi
test ebp, ebp
jne 0x504850
call fcn.00506d50
mov ebp, eax
mov dword [esp + 0x14], eax
test edi, edi
je 0x504856
mov dword [edi], esi
test ebp, ebp
je 0x504ba9
mov eax, dword [ebp + 0x3c]
or edi, 0xffffffff
mov dword [esp + 0x24], edi
test eax, eax
je 0x504bae
lea edx, [eax + ebp]
mov byte [esp + 0x13], 0
movzx eax, word [edx + 6]
mov dword [esp + 0x34], eax
movzx eax, word [edx + 0x14]
add eax, 0x18
mov dword [esp + 0x30], edx
add eax, edx
mov dword [esp + 0x38], eax
mov eax, dword [edx]
xor eax, 0x75652121
cmp eax, 0x75656471
jne 0x504bae
cmp dword [edx + 0x74], 1
jb 0x504ba2
mov ecx, dword [edx + 0x80]
mov eax, dword [edx + 0x84]
test ecx, ecx
je 0x504b98
test eax, eax
je 0x504b91
cmp eax, 0x14
jb 0x504b78
lea ebx, [ecx + eax]
mov byte [esp + 0x12], 0
lea edx, [ecx + ebp]
add ebx, ebp
xor ecx, ecx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x18], ecx
cmp byte [esp + 0x7c], cl
je 0x50493a
mov eax, ebp
xor eax, 0x8a9adede
cmp dword [0x599d38], eax
jne 0x50493a
cmp dword [0x599d2c], ecx
je 0x50493a
mov eax, dword [0x599d2c]
xor eax, 0x8a9adede
je 0x50493a
mov ecx, dword [eax]
test ecx, ecx
je 0x504938
mov eax, dword [eax + 4]
test eax, eax
je 0x504938
xor ecx, 0x8a9adede
mov ebx, eax
xor ebx, 0x8a9adede
add ebx, ecx
add ebx, ebp
lea edx, [ecx + ebp]
mov dword [esp + 0x28], ebx
xor ecx, ecx
lea esi, [edx + 0x10]
mov dword [esp + 0x20], esi
lea eax, [esi - 0x10]
cmp eax, ebx
jae 0x504b36
mov eax, dword [esi - 4]
test eax, eax
je 0x504b36
add eax, ebp
push eax
mov dword [esp + 0x44], eax
call fcn.0050ae60
test eax, eax
je 0x504b3e
mov ecx, dword [esi - 0x10]
test ecx, ecx
jne 0x50497a
cmp dword [esi], ecx
je 0x504b3e
mov edx, dword [eax + 0x18]
mov eax, dword [eax + 0x20]
mov edi, dword [esi]
add eax, edx
mov dword [esp + 0x48], eax
mov dword [esp + 0x1c], edx
lea eax, [edi + ebp]
neg edi
sbb edi, edi
and edi, eax
test ecx, ecx
je 0x5049a0
add ecx, ebp
jmp 0x504af1
xor ecx, ecx
test edi, edi
je 0x504af1
nop word [eax + eax]
cmp byte [edi + ecx], 0
je 0x5049b9
inc ecx
jmp 0x5049b0
test ecx, ecx
setne al
xor ebx, ebx
cmp byte [esp + 0x7c], bl
movzx eax, al
cmove ebx, eax
test bl, bl
je 0x504aeb
lea ebp, [ecx*4]
xor bl, bl
push 4
mov eax, ebp
and eax, 0xfffff000
push 0x101000
add eax, 0x1000
push eax
push 0
call fcn.0050aaf0
cmp dword [esp + 0x24], 0xffffffff
mov dword [esp + 0x18], eax
jne 0x504ae3
test eax, eax
je 0x504ae3
push dword [esp + 0x14]
call fcn.00503e60
mov esi, eax
test esi, esi
je 0x504add
call fcn.005079d0
test eax, eax
je 0x504add
push 0
push 0
push 3
push 0
push 3
push 0x80000000
push esi
call eax
mov dword [esp + 0x24], eax
cmp eax, 0xffffffff
je 0x504add
mov eax, dword [esp + 0x30]
push dword [eax + 0x38]
mov eax, edi
push dword [esp + 0x38]
sub eax, dword [esp + 0x1c]
push dword [esp + 0x40]
push eax
call fcn.0050af70
mov esi, eax
test esi, esi
je 0x504adf
call fcn.00508090
test eax, eax
je 0x504add
push 0
lea ecx, [esp + 0x5c]
mov dword [esp + 0x58], esi
push ecx
push esi
mov esi, dword [esp + 0x30]
push esi
mov dword [esp + 0x68], 0
call eax
cmp eax, dword [esp + 0x54]
jne 0x504ad2
call fcn.00507ff0
test eax, eax
je 0x504ad2
push 0
lea ecx, [esp + 0x54]
mov dword [esp + 0x54], 0
push ecx
push ebp
push dword [esp + 0x24]
push esi
call eax
test eax, eax
je 0x504aca
cmp dword [esp + 0x50], ebp
mov ecx, 1
movzx ebx, bl
cmove ebx, ecx
mov dword [esp + 0x50], 0
xorps xmm0, xmm0
movlpd qword [esp + 0x54], xmm0
jmp 0x504adf
xor bl, bl
mov esi, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x14]
xor ecx, ecx
test bl, bl
je 0x504b3e
push dword [esp + 0x78]
lea eax, [esp + 0x30]
test ecx, ecx
push dword [esp + 0x78]
push dword [esp + 0x44]
push dword [esp + 0x4c]
push dword [esp + 0x54]
push eax
mov eax, dword [esp + 0x30]
push 1
push dword [esp + 0x64]
cmovne eax, ecx
push edx
push edx
push edi
push eax
push ebp
call fcn.00504530
mov ecx, dword [esp + 0x18]
mov bl, byte [esp + 0x12]
test al, al
je 0x504b46
mov byte [esp + 0x13], 1
jmp 0x504b46
mov bl, 1
mov byte [esp + 0x12], bl
jmp 0x504b46
mov ecx, dword [esp + 0x18]
mov bl, byte [esp + 0x12]
add esi, 0x14
mov dword [esp + 0x20], esi
test ecx, ecx
je 0x504b64
push 0x8000
push 0
push ecx
call fcn.0050ab60
xor ecx, ecx
mov dword [esp + 0x18], ecx
test bl, bl
mov ebx, dword [esp + 0x28]
je 0x504941
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x24]
xor ebx, ebx
cmp byte [esp + 0x13], bl
setne bl
add ebx, 6
cmp edi, 0xffffffff
je 0x504bae
push edi
call fcn.005065f0
jmp 0x504bae
mov ebx, 3
jmp 0x504bae
xor ebx, ebx
test eax, eax
setne bl
inc ebx
jmp 0x504bae
mov ebx, 1
jmp 0x504bae
mov ebx, 8
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x504bb8
mov dword [eax], esi
mov ecx, dword [esp + 0x5c]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.005168d0
add esp, 0x50
ret 0x1c