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

Disassembly:
sub esp, 0x50
mov eax, dword [esp + 0x68]
xorps xmm0, xmm0
mov ecx, dword [esp + 0x64]
push ebx
mov ebx, dword [esp + 0x64]
push esi
mov ecx, dword [ecx]
mov esi, dword [esp + 0x64]
add ebx, esi
push edi
mov edi, dword [eax]
movlpd qword [esp + 0x54], xmm0
movlpd qword [esp + 0x4c], xmm0
movlpd qword [esp + 0x34], xmm0
lea eax, [edi + ecx]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x24], eax
xor eax, eax
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], eax
cmp dword [esp + 0x60], eax
je 0x504210
call fcn.00598d40
test eax, eax
jne 0x504204
mov eax, edi
cdq
add eax, 0xa
adc edx, 0
push edx
push eax
call fcn.005660f0
add esp, 8
mov dword [esp + 0x30], eax
test eax, eax
jne 0x504216
pop edi
pop esi
mov eax, 7
pop ebx
add esp, 0x50
ret
mov eax, ecx
mov dword [esp + 0x30], ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], eax
push ebp
cmp esi, ebx
jb 0x504227
xor edi, edi
jmp 0x504238
lea eax, [esp + 0x58]
push eax
push esi
call fcn.00558880
add esp, 8
lea edi, [esi + eax]
mov eax, dword [esp + 0x2c]
mov ebx, dword [esp + 0x5c]
mov ebp, dword [esp + 0x58]
mov dword [esp + 0x14], edi
cmp eax, dword [esp + 0x28]
jb 0x50425a
mov eax, dword [esp + 0x54]
xor esi, esi
mov ecx, dword [esp + 0x50]
jmp 0x504276
lea ecx, [esp + 0x58]
push ecx
push eax
call fcn.00558880
mov ecx, dword [esp + 0x60]
mov esi, eax
mov eax, dword [esp + 0x64]
add esp, 8
add esi, dword [esp + 0x2c]
mov dword [esp + 0x70], eax
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x10], esi
test edi, edi
je 0x5044c4
nop word [eax + eax]
test esi, esi
je 0x5044c4
cmp ebx, eax
jl 0x5042af
jg 0x5042a2
cmp ebp, ecx
jbe 0x5042b1
mov eax, 1
or ecx, 0xffffffff
jmp 0x5043e2
cmp ebp, ecx
jne 0x5043da
cmp ebx, eax
jne 0x5043da
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x38]
mov edi, dword [esp + 0x3c]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x1c]
push ebx
mov dword [esp + 0x20], eax
lea eax, [esp + 0x28]
push ebp
push eax
lea eax, [esp + 0x44]
push eax
push dword [esp + 0x74]
lea eax, [esp + 0x34]
push eax
call fcn.00512540
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x30]
push eax
push 1
push 0
push dword [esp + 0x90]
lea eax, [esp + 0x4c]
push eax
call fcn.00511520
add esp, 0x30
test eax, eax
jne 0x504331
mov eax, dword [esp + 0x18]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x24], eax
jmp 0x504341
mov eax, dword [esp + 0x24]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x18], eax
mov edi, dword [esp + 0x14]
cmp edi, dword [esp + 0x30]
jb 0x504353
xor edi, edi
mov dword [esp + 0x14], edi
jmp 0x504380
lea eax, [esp + 0x40]
push eax
push edi
call fcn.00558880
add edi, eax
add esp, 8
cmp dword [esp + 0x64], 0
mov dword [esp + 0x14], edi
je 0x504378
sub ebp, dword [esp + 0x40]
sbb ebx, dword [esp + 0x44]
jmp 0x504380
add ebp, dword [esp + 0x40]
adc ebx, dword [esp + 0x44]
mov esi, dword [esp + 0x10]
cmp esi, dword [esp + 0x28]
jb 0x50439d
mov eax, dword [esp + 0x70]
xor esi, esi
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x10], esi
jmp 0x5044bc
lea eax, [esp + 0x48]
push eax
push esi
call fcn.00558880
mov ecx, dword [esp + 0x74]
add esi, eax
mov eax, dword [esp + 0x78]
add esp, 8
cmp dword [esp + 0x64], 0
mov dword [esp + 0x10], esi
je 0x5043cd
sub ecx, dword [esp + 0x48]
sbb eax, dword [esp + 0x4c]
jmp 0x5044b4
add ecx, dword [esp + 0x48]
adc eax, dword [esp + 0x4c]
jmp 0x5044b4
or eax, 0xffffffff
mov ecx, 1
cmp dword [esp + 0x64], 0
cmovne eax, ecx
test eax, eax
jns 0x50444c
mov dl, byte [edi]
test dl, dl
je 0x504400
inc edi
mov cl, dl
and cl, 0x80
mov dl, byte [edi]
or cl, dl
jne 0x5043f4
lea eax, [edi + 1]
mov dword [esp + 0x14], eax
cmp eax, dword [esp + 0x30]
jae 0x5044c4
lea ecx, [esp + 0x50]
push ecx
push eax
call fcn.00558880
mov ecx, dword [esp + 0x74]
mov edi, eax
add edi, dword [esp + 0x1c]
add esp, 8
cmp dword [esp + 0x64], 0
mov eax, dword [esp + 0x70]
mov dword [esp + 0x14], edi
je 0x504442
sub ebp, dword [esp + 0x50]
sbb ebx, dword [esp + 0x54]
jmp 0x5044bc
add ebp, dword [esp + 0x50]
adc ebx, dword [esp + 0x54]
jmp 0x5044bc
mov dl, byte [esi]
test dl, dl
je 0x50445e
inc esi
mov cl, dl
and cl, 0x80
mov dl, byte [esi]
or cl, dl
jne 0x504452
lea eax, [esi + 1]
mov dword [esp + 0x10], eax
cmp eax, dword [esp + 0x28]
jb 0x50447b
mov eax, dword [esp + 0x70]
xor esi, esi
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x10], esi
jmp 0x5044bc
lea ecx, [esp + 0x58]
push ecx
push eax
call fcn.00558880
mov ecx, dword [esp + 0x74]
mov esi, eax
add esi, dword [esp + 0x18]
add esp, 8
cmp dword [esp + 0x64], 0
mov eax, dword [esp + 0x70]
mov dword [esp + 0x10], esi
je 0x5044ac
sub ecx, dword [esp + 0x58]
sbb eax, dword [esp + 0x5c]
jmp 0x5044b4
add ecx, dword [esp + 0x58]
adc eax, dword [esp + 0x5c]
mov dword [esp + 0x70], eax
mov dword [esp + 0x6c], ecx
test edi, edi
jne 0x504290
mov ecx, dword [esp + 0x78]
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x34]
sub eax, esi
cmp dword [esp + 0x64], 0
mov dword [ecx], eax
pop ebp
je 0x50454f
mov ebx, dword [esp + 0x28]
test ebx, ebx
je 0x504549
cmp dword [0x645f38], 0
je 0x50453f
mov eax, dword [0x64de48]
test eax, eax
je 0x504500
push eax
call dword [0x645f88]
add esp, 4
push ebx
call dword [0x645f64]
sub dword [0x64dde8], eax
dec dword [0x64de0c]
push ebx
call dword [0x645f5c]
mov eax, dword [0x64de48]
add esp, 8
test eax, eax
je 0x504549
push eax
call dword [0x645f90]
mov eax, dword [esp + 0x74]
add esp, 4
pop edi
mov dword [eax], esi
xor eax, eax
pop esi
pop ebx
add esp, 0x50
ret
push ebx
call dword [0x645f5c]
add esp, 4
mov eax, dword [esp + 0x70]
mov dword [eax], esi
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x50
ret