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

Disassembly:
sub esp, 0x374
mov eax, dword [0x62f018]
xor eax, esp
mov dword [esp + 0x36c], eax
push ebx
push ebp
push esi
mov ebx, ecx
mov ecx, 0x6355a1
push edi
call fcn.00561ea5
mov eax, dword [ebx + 0x28]
shr eax, 1
and al, 1
mov dword [esp + 0x28], eax
jne 0x51988d
cmp dword [ebx + 0x48], 0xffffffff
jmp 0x519891
cmp dword [ebx + 0x4c], 0xffffffff
je 0x519b12
mov ecx, ebx
call fcn.00519ce6
mov dword [esp + 0x24], eax
test eax, eax
je 0x519b12
mov ecx, dword [ebx + 0x20]
test ecx, ecx
je 0x5198c8
mov eax, dword [ebx + 0x18]
mov dword [esp + 0x30], ecx
mov cl, byte [ebx + 0x2c]
mov dword [esp + 0x2c], eax
movzx eax, cl
mov dword [esp + 0x34], eax
jmp 0x5198cb
mov cl, byte [ebx + 0x2c]
xor eax, eax
lea edi, [esp + 0x64]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
test cl, cl
jne 0x5198ee
mov eax, dword [ebx + 0x18]
mov dword [esp + 0x68], eax
mov eax, dword [ebx + 0x1c]
mov dword [esp + 0x64], 3
mov dword [esp + 0x6c], eax
mov ecx, dword [ebx + 0x54]
xor eax, eax
mov dword [esp + 0x1c], eax
test ecx, ecx
je 0x5198fd
mov eax, dword [ecx]
xor ecx, ecx
add eax, 3
push 0xc
pop ebp
mul ebp
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0052ffb8
mov esi, eax
mov dword [esp], 0x308
lea eax, [esp + 0x68]
xor edi, edi
push 0
inc edi
mov dword [esi + 8], eax
lea eax, [esp + 0x78]
mov dword [esi], 0x47670001
mov dword [esi + 4], ebp
mov ebp, dword [ebx + 0x24]
push eax
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], esi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
test ebp, ebp
je 0x5199c6
cmp byte [ebx + 0x2c], 0
mov edi, 0x308
je 0x5199b0
and dword [esp + 0x20], 0
lea eax, [esp + 0x20]
push eax
push edi
lea eax, [esp + 0x78]
push eax
push ebp
push dword [ebx + 0x10]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x51997d
cmp dword [esp + 0x20], edi
je 0x5199ac
cmp byte [ebx + 0x50], 0
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x51998e
push dword [ebx + 0x48]
call edi
cmp byte [ebx + 0x51], 0
je 0x519b05
cmp dword [ebx + 0x4c], 0xffffffff
je 0x519b05
push dword [ebx + 0x4c]
call edi
jmp 0x519b05
lea ebp, [esp + 0x70]
mov dword [esi + 0x10], edi
mov dword [esi + 0xc], 0x47670002
mov dword [esi + 0x14], ebp
mov edi, dword [esp + 0x14]
inc edi
mov dword [esp + 0x14], edi
mov ecx, dword [ebx + 0x54]
test ecx, ecx
je 0x519a20
xor eax, eax
mov ebp, eax
cmp dword [ecx], eax
jbe 0x519a20
mov edx, eax
mov eax, dword [ebx + 0x54]
imul ecx, edi, 0xc
mov eax, dword [eax + 4]
mov eax, dword [edx + eax]
lea edx, [edx + 0xc]
mov dword [ecx + esi], eax
imul ecx, dword [esp + 0x14], 0xc
mov eax, dword [ebx + 0x54]
mov eax, dword [eax + 4]
mov eax, dword [eax + edx - 8]
mov dword [ecx + esi + 4], eax
imul ecx, dword [esp + 0x14], 0xc
inc ebp
mov eax, dword [ebx + 0x54]
mov eax, dword [eax + 4]
mov eax, dword [eax + edx - 4]
mov dword [ecx + esi + 8], eax
mov edi, dword [esp + 0x14]
mov eax, dword [ebx + 0x54]
inc edi
mov dword [esp + 0x14], edi
cmp ebp, dword [eax]
jb 0x5199d7
lea ecx, [esp + 0x38]
call fcn.0051949c
cmp dword [ebx + 0x20], 0
je 0x519a74
test byte [ebx + 0x28], 4
jne 0x519a74
push dword [ebx + 0x20]
lea ecx, [esp + 0x3c]
push dword [ebx + 0x10]
call fcn.00519524
test al, al
jne 0x519a74
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebx + 0x50], al
je 0x519a58
push dword [ebx + 0x48]
call edi
cmp byte [ebx + 0x51], 0
je 0x519a69
cmp dword [ebx + 0x4c], 0xffffffff
je 0x519a69
push dword [ebx + 0x4c]
call edi
xor ebx, ebx
mov dword [esp + 0x1c], ebx
jmp 0x519afc
cmp byte [esp + 0x28], 0
je 0x519a9c
xor ecx, ecx
lea eax, [esp + 0x14]
push ecx
push eax
xor edx, edx
lea eax, [esp + 0x34]
cmp dword [ebx + 0x20], ecx
cmove eax, edx
push eax
mov eax, dword [ebx + 0x28]
or eax, 4
push eax
push dword [ebx + 0x4c]
jmp 0x519ae9
imul ecx, dword [esp + 0x14], 0xc
mov eax, dword [esp + 0x50]
cmp eax, dword [esp + 0x54]
je 0x519aca
mov dword [ecx + esi], 0x12
mov eax, dword [esp + 0x54]
sub eax, dword [esp + 0x50]
mov dword [ecx + esi + 4], eax
mov eax, dword [esp + 0x50]
mov dword [ecx + esi + 8], eax
inc dword [esp + 0x14]
push dword [ebx + 0x58]
xor ecx, ecx
lea eax, [esp + 0x18]
cmp dword [ebx + 0x20], ecx
push eax
lea eax, [esp + 0x34]
cmove eax, ecx
push eax
mov eax, dword [ebx + 0x28]
and eax, 0xfffffffd
push eax
push dword [ebx + 0x48]
push dword [ebx + 0x14]
push dword [ebx + 0x10]
call dword [esp + 0x40]
test eax, eax
setne al
mov byte [esp + 0x1c], al
lea ecx, [esp + 0x38]
call fcn.005194de
push esi
call fcn.0052fc78
mov al, byte [esp + 0x20]
pop ecx
jmp 0x519b14
xor al, al
mov ecx, dword [esp + 0x37c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0052f553
add esp, 0x374
ret