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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x52c
mov eax, dword [0x5c04b4]
xor eax, esp
mov dword [esp + 0x528], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, ecx
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0x1c]
cmp dword [edi + 0x38], 0
mov dword [esp + 0x1c], eax
mov byte [esp + 0xf], 0
jne 0x51404c
call fcn.005150b0
test eax, eax
jne 0x5142f7
mov ecx, dword [ebp + 0x20]
and ecx, 0xf
mov edx, ecx
and edx, 1
mov dword [esp + 0x14], edx
je 0x514065
xor ebx, ebx
mov dword [esp + 0x1c], ebx
jmp 0x514068
mov ebx, dword [ebp + 0x18]
mov esi, dword [ebp + 0x10]
cmp esi, 0x254
ja 0x51407b
cmp ebx, 0x258
jbe 0x514080
mov byte [esp + 0xf], 1
xor eax, eax
mov dword [esp + 0x4c], ecx
mov cl, byte [esp + 0xf]
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x48], eax
mov eax, 0xc
mov dword [esp + 0x50], ebx
mov word [esp + 0x20], ax
test cl, cl
je 0x51417f
mov edx, 0x34
add ax, 0x28
mov word [esp + 0x26], dx
xor edx, edx
mov dword [esp + 0x58], edx
mov dword [esp + 0x54], edx
mov dword [esp + 0x5c], edx
mov dword [esp + 0x60], edx
mov dword [esp + 0x64], edx
mov dword [esp + 0x68], edx
mov dword [esp + 0x6c], edx
mov dword [esp + 0x70], edx
mov dword [esp + 0x74], edx
mov dword [esp + 0x78], edx
mov dword [esp + 0x58], edx
mov edx, dword [esp + 0x14]
mov dword [esp + 0x54], 2
mov word [esp + 0x20], ax
cmp esi, 0x22c
jbe 0x51413a
mov eax, dword [esp + 0x10]
mov dword [esp + 0x5c], eax
mov dword [esp + 0x64], esi
mov dword [esp + 0x68], 0
jmp 0x514169
test esi, esi
je 0x514161
mov eax, dword [esp + 0x10]
push esi
push eax
lea eax, [esp + 0x84]
push eax
call sub.MSVCR120.dll_memcpy
mov ax, word [esp + 0x2c]
add esp, 0xc
mov edx, dword [esp + 0x14]
mov cl, byte [esp + 0xf]
add ax, si
mov word [esp + 0x20], ax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x6c], eax
mov dword [esp + 0x74], ebx
mov dword [esp + 0x78], 0
jmp 0x5141ab
test esi, esi
je 0x5141a3
mov eax, dword [esp + 0x10]
push esi
push eax
lea eax, [esp + 0x5c]
push eax
call sub.MSVCR120.dll_memcpy
mov ax, word [esp + 0x2c]
add esp, 0xc
mov edx, dword [esp + 0x14]
mov cl, byte [esp + 0xf]
add ax, si
mov word [esp + 0x20], ax
mov eax, dword [esp + 0x20]
add eax, 0x28
mov word [esp + 0x22], ax
test edx, edx
je 0x514260
test cl, cl
jne 0x514260
lea eax, [esp + 0x20]
push eax
push dword [edi + 0x38]
call dword [0x5c0354]
mov esi, eax
test esi, esi
jns 0x514242
cmp esi, 0xc000000d
jne 0x514201
xor eax, eax
test esi, esi
sets al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x528]
xor ecx, esp
call fcn.00553510
mov esp, ebp
pop ebp
ret 0x1c
lea ebx, [edi + 0x14]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi + 0x38]
test eax, eax
je 0x514220
push eax
call dword [0x5c001c]
mov dword [edi + 0x38], 0
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, edi
call fcn.005150b0
test eax, eax
jne 0x514242
lea eax, [esp + 0x20]
push eax
push dword [edi + 0x38]
call dword [0x5c0354]
mov esi, eax
xor eax, eax
test esi, esi
sets al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x528]
xor ecx, esp
call fcn.00553510
mov esp, ebp
pop ebp
ret 0x1c
mov eax, dword [edi + 0x34]
mov ecx, edi
shr eax, 8
and al, 1
mov dword [esp + 0x2a8], 0
movzx eax, al
push eax
lea eax, [esp + 0x2ac]
mov dword [esp + 0x2ac], 0x2880260
push eax
lea eax, [esp + 0x28]
push eax
call fcn.00515210
test eax, eax
js 0x5142f7
cmp word [esp + 0x2a8], 8
jb 0x5142f7
mov esi, dword [esp + 0x2d4]
cmp esi, ebx
ja 0x5142f7
lea eax, [esi - 1]
cmp eax, 0x257
ja 0x5142cf
push esi
lea eax, [esp + 0x2dc]
push eax
push dword [esp + 0x20]
call sub.MSVCR120.dll_memcpy
add esp, 0xc
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x2d0]
test ecx, ecx
je 0x5142fc
mov dword [ecx], esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x528]
xor ecx, esp
call fcn.00553510
mov esp, ebp
pop ebp
ret 0x1c
mov eax, 1
mov ecx, dword [esp + 0x534]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00553510
mov esp, ebp
pop ebp
ret 0x1c