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

Disassembly:
sub esp, 0xc
mov eax, 0x54e428
mov word [esp + 2], cx
test eax, eax
mov dword [esp + 4], edx
push ebx
push esi
push edi
push ebp
jne 0x517da5
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xc
ret 0x1c
call fcn.00517af0
test eax, eax
jne 0x517dba
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xc
ret 0x1c
mov edi, dword [esp + 0x24]
mov ebx, dword [esp + 0x28]
mov ebp, dword [esp + 0x38]
test ebp, ebp
je 0x517e08
push ebp
push 0
call fcn.00517ce0
add esp, 8
mov esi, eax
test esi, esi
jne 0x517edb
mov eax, dword [esp + 0x34]
push ebp
mov ecx, dword [esp + 0x34]
push eax
mov edx, dword [esp + 0x34]
push ecx
push edx
mov eax, edi
push ebx
or eax, 0x1100
mov edx, dword [esp + 0x34]
push eax
mov ecx, 0x1000
call fcn.00516a60
jmp 0x517e1f
mov eax, edi
mov edx, 0x1000
and eax, 0xfffffffb
xor ecx, ecx
or eax, 0x1100
push eax
call fcn.00516ef0
mov esi, eax
test esi, esi
jne 0x517e3d
mov edx, 2
xor ecx, ecx
call fcn.00518380
test eax, eax
jne 0x517dc6
test esi, esi
je 0x517fd8
xor ax, ax
movzx ecx, ax
inc ax
mov dword [esi + ecx*4], 0
cmp ax, 5
jb 0x517e40
xor edx, edx
lea ebx, [esi + 0x22]
mov eax, edi
mov dword [esi + 0x14], edx
and ax, 0xfffd
lea ecx, [esi + 0x24]
mov dword [esi + 0x18], edx
mov dword [esp + 0x18], ecx
mov dword [esi + 0x1c], edx
mov word [esi + 0x20], 0xbead
mov word [ebx], ax
mov word [ecx], dx
mov word [esi + 0x26], 0x100
cmp word [esi + 0x28], dx
jne 0x517e91
mov word [esi + 0x28], 0x4000
mov word [esi + 0x2a], 0x1000
mov dword [esi + 0x30], 0x40000
mov dword [esi + 0x34], 0xfffffffe
xor eax, eax
test edi, 1
mov dword [esi + 0x38], eax
mov dword [esi + 0x3c], eax
mov dword [esi + 0x280], eax
mov dword [esi + 0x278], eax
je 0x517ebe
or edi, 2
test edi, 2
je 0x517f02
mov dword [esi + 0x78], 0
test byte [ebx], 1
je 0x517eec
mov ecx, esi
call fcn.00517890
jmp 0x517efb
call fcn.00517b80
mov eax, esi
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xc
ret 0x1c
lea eax, [esi + 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov eax, 1
test eax, eax
je 0x517f1f
mov word [ebx], di
and edi, 1
je 0x517f2f
push 0
mov edx, ebp
push 1
mov ecx, esi
call fcn.005173c0
test eax, eax
jne 0x517f2f
xor esi, esi
jmp 0x517fd8
mov edx, esi
mov ecx, esi
xor esi, esi
call fcn.00517210
jmp 0x517fd8
push 0x54e1a4
push 0x6e56d0
call fcn.005179e0
add esp, 8
test eax, eax
jne 0x517f51
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xc
ret 0x1c
test edi, edi
jne 0x517f5c
mov dword [esi + 0x44], 0x54e428
test byte [ebx], 1
lea eax, [esi + 0x40]
je 0x517f6b
mov ecx, esi
call fcn.00517640
mov ecx, dword [0x54e42c]
push 0x6e56d0
mov dword [eax], ecx
mov dword [0x54e42c], esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ax, word [ebx]
mov ecx, dword [esp + 0x12]
and ax, 1
push ecx
cmp ax, 1
push esi
sbb eax, eax
and eax, 0xffff1000
add eax, 0x10000
mov dword [esi + 0x2c], eax
call fcn.005180f0
test eax, eax
jne 0x517fba
xor edx, edx
mov ecx, esi
xor esi, esi
call fcn.005181d0
jmp 0x517fd8
cmp dword [esp + 0x14], 0
je 0x517fd8
push 1
xor eax, eax
mov ecx, dword [esp + 0x1c]
mov ax, word [ecx]
imul eax, dword [esp + 0x18]
push eax
push esi
call fcn.00514370
call fcn.00517b80
mov eax, esi
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xc
ret 0x1c