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

Disassembly:
push 0xffffffffffffffff
push 0x5e6588
mov eax, dword fs:[0]
push eax
sub esp, 0x54
mov eax, dword [0x638190]
xor eax, esp
mov dword [esp + 0x50], eax
push ebp
push esi
push edi
mov eax, dword [0x638190]
xor eax, esp
push eax
lea eax, [esp + 0x64]
mov dword fs:[0], eax
mov esi, dword [esp + 0x74]
mov eax, dword [esp + 0x7c]
mov edi, dword [esp + 0x78]
mov ebp, dword [esp + 0x80]
mov dword [esp + 0x10], edx
mov edx, dword [esi + 0x28]
mov dword [esp + 0x18], edx
mov dx, word [esi + 0x20]
and dx, 0xfff9
cmp dword [esp + 0x88], 0
movzx edx, dx
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0x24]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], edx
jne 0x51d6d2
cmp dword [esp + 0x84], 0
je 0x51d676
cmp eax, dword [esp + 0x18]
jge 0x51d63a
cmp dx, 1
jne 0x51d606
mov ecx, edi
call fcn.004f4030
mov esi, dword [esp + 0x1c]
lea eax, [edi + 4]
push eax
mov ecx, esi
call fcn.004f4410
push esi
mov ecx, ebx
call fcn.004f2e40
push edi
lea ecx, [ebx + 0x24]
call fcn.004f2e40
mov eax, 2
jmp 0x51d8e2
lea esi, [edi + 0x24]
mov ecx, esi
call fcn.004f4030
add edi, 0x28
push edi
mov edi, dword [esp + 0x20]
mov ecx, edi
call fcn.004f4410
push edi
mov ecx, ebx
call fcn.004f2e40
push esi
lea ecx, [ebx + 0x24]
call fcn.004f2e40
mov eax, 2
jmp 0x51d8e2
cmp dx, 1
jne 0x51d64e
lea edx, [edi + 0x30]
push edx
call fcn.004f42e0
add edi, 0x24
jmp 0x51d657
lea edx, [edi + 0xc]
push edx
call fcn.004f42e0
push edi
mov ecx, ebx
call fcn.004f2e40
mov eax, dword [esp + 0x1c]
push eax
lea ecx, [ebx + 0x24]
call fcn.004f2e40
mov eax, 2
jmp 0x51d8e2
cmp eax, dword [esp + 0x18]
jge 0x51d6b7
cmp dx, 1
jne 0x51d69b
mov ecx, edi
call fcn.004f4030
push edi
mov ecx, ebx
call fcn.004f2e40
mov eax, 1
jmp 0x51d8e2
lea esi, [edi + 0x24]
mov ecx, esi
call fcn.004f4030
push esi
mov ecx, ebx
call fcn.004f2e40
mov eax, 1
jmp 0x51d8e2
cmp dx, 1
jne 0x51d6c0
add edi, 0x24
push edi
mov ecx, ebx
call fcn.004f2e40
mov eax, 1
jmp 0x51d8e2
lea ecx, [esp + 0x3c]
call fcn.004f1250
xor eax, eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
cmp dword [esp + 0x84], eax
je 0x51d870
mov ecx, dword [esp + 0x18]
cmp dword [esp + 0x24], ecx
lea ecx, [esp + 0x3c]
jge 0x51d7c0
cmp word [esp + 0x20], 1
jne 0x51d722
mov edx, dword [esp + 0x10]
add edx, 0x24
push edx
jmp 0x51d727
mov eax, dword [esp + 0x10]
push eax
call fcn.004f2e40
lea ecx, [esp + 0x3c]
call fcn.004f4030
mov ecx, dword [ebp + 0xc]
cmp ecx, dword [ebp + 4]
lea edi, [ebp + 4]
jne 0x51d748
mov edx, dword [ebp + 0x10]
cmp edx, dword [edi + 4]
je 0x51d793
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x40]
push ecx
push ebp
call fcn.00503420
add esp, 0xc
lea edx, [esp + 0x2c]
push edx
mov ecx, ebp
call fcn.004f4410
mov ecx, ebp
call fcn.004f41c0
fstp qword [esp + 0x24]
mov ecx, esi
call fcn.004f41c0
fcomp qword [esp + 0x24]
fnstsw ax
test ah, 5
jp 0x51d78c
push edi
mov ecx, ebp
call fcn.004f4410
lea eax, [esp + 0x2c]
push eax
jmp 0x51d794
push edi
lea ecx, [esp + 0x40]
call fcn.004f42e0
mov esi, dword [esp + 0x14]
push ebp
mov ecx, esi
call fcn.004f2e40
lea ecx, [esp + 0x3c]
push ecx
lea ecx, [esi + 0x24]
call fcn.004f2e40
mov esi, 2
jmp 0x51d8cf
cmp word [esp + 0x20], 1
jne 0x51d7cf
mov edx, dword [esp + 0x10]
push edx
jmp 0x51d7d7
mov eax, dword [esp + 0x10]
add eax, 0x24
push eax
call fcn.004f2e40
mov ecx, dword [ebp + 0xc]
lea edi, [ebp + 0xc]
cmp ecx, dword [ebp + 4]
lea eax, [ebp + 4]
jne 0x51d7f2
mov edx, dword [edi + 4]
cmp edx, dword [eax + 4]
je 0x51d846
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x40]
push ebp
push ecx
call fcn.00503420
add esp, 0xc
lea edx, [esp + 0x2c]
push edx
lea ecx, [esp + 0x40]
call fcn.004f4410
lea eax, [esp + 0x2c]
push eax
mov ecx, ebp
call fcn.004f42e0
mov ecx, ebp
call fcn.004f41c0
fstp qword [esp + 0x24]
mov ecx, esi
call fcn.004f41c0
fcomp qword [esp + 0x24]
fnstsw ax
test ah, 5
jp 0x51d850
push edi
mov ecx, ebp
call fcn.004f42e0
jmp 0x51d850
push eax
lea ecx, [esp + 0x40]
call fcn.004f4410
mov esi, dword [esp + 0x14]
lea ecx, [esp + 0x3c]
push ecx
mov ecx, esi
call fcn.004f2e40
push ebp
lea ecx, [esi + 0x24]
call fcn.004f2e40
mov esi, 2
jmp 0x51d8cf
mov edx, dword [esp + 0x18]
cmp dword [esp + 0x24], edx
jge 0x51d8aa
cmp word [esp + 0x20], 1
jne 0x51d88c
mov eax, dword [esp + 0x10]
add eax, 0x24
push eax
jmp 0x51d891
mov ecx, dword [esp + 0x10]
push ecx
lea ecx, [esp + 0x40]
call fcn.004f2e40
lea ecx, [esp + 0x3c]
call fcn.004f4030
lea edx, [esp + 0x3c]
push edx
jmp 0x51d8c1
cmp word [esp + 0x20], 1
jne 0x51d8b9
mov eax, dword [esp + 0x10]
push eax
jmp 0x51d8c1
mov ecx, dword [esp + 0x10]
add ecx, 0x24
push ecx
mov ecx, dword [esp + 0x18]
call fcn.004f2e40
mov esi, 1
lea ecx, [esp + 0x3c]
mov dword [esp + 0x6c], 0xffffffff
call fcn.004f1b60
mov eax, esi
mov ecx, dword [esp + 0x64]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.005c3bb6
add esp, 0x60
ret