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

Disassembly:
mov eax, 0xc34
call fcn.0057aae0
mov eax, dword [0x5fbea4]
xor eax, esp
mov dword [esp + 0xc30], eax
push ebp
push edi
mov edi, dword [esp + 0xc40]
xor ebp, ebp
mov dword [esp + 0xc], ebp
cmp dword [edi + 0x48], ebp
jbe 0x51520d
push ebx
push esi
xor eax, eax
mov dword [esp + 0x34], eax
nop dword [eax + eax]
xor ebx, ebx
mov dword [esp + 0x18], ebx
cmp dword [edi + 0x30], ebx
jbe 0x5151ef
mov dword [esp + 0x10], eax
movzx eax, al
mov dword [esp + 0x24], eax
nop word [eax + eax]
push 0x400
lea eax, [esp + 0x44]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov esi, dword [edi + 0x40]
add esp, 0xc
mov eax, esi
sub eax, 1
je 0x514f67
sub eax, 1
mov eax, dword [esp + 0x10]
jne 0x514fe4
test ebp, ebp
jne 0x514fe4
cmp al, 2
jae 0x514fe4
push 0x400
lea eax, [esp + 0x844]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push 0x400
lea eax, [esp + 0x50]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov eax, dword [esp + 0x3c]
add esp, 0x18
mov dword [esp + 0x50], eax
mov eax, dword [edi + 0x4c]
mov dword [esp + 0x58], eax
mov eax, dword [edi + 0x48]
mov dword [esp + 0x60], eax
mov eax, esi
cdq
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x40], ebp
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], 0
mov dword [esp + 0x54], 0
mov dword [esp + 0x5c], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x6c], edx
xor ebx, ebx
test ebp, ebp
jne 0x51503c
test al, al
jne 0x51503c
lea ebx, [ebp + 2]
sub esi, 1
je 0x514ffb
sub esi, 1
jne 0x51503c
add dword [esp + 0x70], 1
lea eax, [esp + 0x440]
push 0
adc dword [esp + 0x78], 0
push eax
lea eax, [esp + 0x48]
push eax
lea eax, [esp + 0x84c]
push eax
call fcn.005137a0
push 0
lea eax, [esp + 0x454]
push eax
push eax
lea eax, [esp + 0x85c]
push eax
call fcn.005137a0
add esp, 0x20
mov ecx, dword [edi + 0x54]
xor edx, edx
mov eax, dword [esp + 0x24]
mov esi, ecx
mov ebp, dword [edi + 0x50]
imul esi, dword [esp + 0x18]
imul eax, ebp
add eax, ebx
add esi, eax
mov eax, esi
mov dword [esp + 0x30], esi
div ecx
test edx, edx
jne 0x515067
dec ecx
add ecx, esi
jmp 0x51506a
lea ecx, [esi - 1]
cmp ebx, ebp
jae 0x5151d5
mov eax, esi
lea ebp, [esi - 1]
shl eax, 0xa
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ebp
xor edx, edx
mov eax, esi
div dword [edi + 0x54]
push dword [esp + 0x10]
cmp edx, 1
push dword [esp + 0x18]
cmovne ebp, ecx
push edi
call fcn.00513770
add esp, 0xc
test eax, eax
je 0x5150fd
mov esi, ebx
and esi, 0x7f
jne 0x5150e9
add dword [esp + 0x70], 1
lea eax, [esp + 0x440]
push esi
adc dword [esp + 0x78], esi
push eax
lea eax, [esp + 0x48]
push eax
lea eax, [esp + 0x84c]
push eax
call fcn.005137a0
push esi
lea eax, [esp + 0x454]
push eax
push eax
lea eax, [esp + 0x85c]
push eax
call fcn.005137a0
add esp, 0x20
mov eax, dword [esp + esi*8 + 0x440]
mov dword [esp + 0x28], eax
mov eax, dword [esp + esi*8 + 0x444]
jmp 0x515110
mov eax, dword [edi + 0x44]
mov ecx, ebp
shl ecx, 0xa
mov edx, dword [ecx + eax]
mov eax, dword [ecx + eax + 4]
mov dword [esp + 0x28], edx
push 0
push dword [edi + 0x30]
push 0
push eax
call fcn.0057b4b0
cmp dword [esp + 0x14], 0
mov ecx, eax
mov dword [esp + 0x2c], ecx
jne 0x515148
cmp byte [esp + 0x10], 0
jne 0x515148
mov eax, dword [esp + 0x18]
mov dword [esp + 0x2c], eax
mov eax, 1
mov dword [esp + 0x3c], 0
jmp 0x515159
cmp ecx, dword [esp + 0x18]
jne 0x515157
test edx, edx
jne 0x515157
lea eax, [edx + 1]
jmp 0x515159
xor eax, eax
mov esi, dword [edi + 0x44]
push eax
push dword [esp + 0x2c]
push ebx
push dword [esp + 0x1c]
push dword [esp + 0x24]
push edi
call fcn.005156b0
mov edx, dword [edi + 0x54]
add esp, 0x18
imul edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x1c]
add ecx, esi
lea edx, [edx + eax]
shl edx, 0xa
add edx, esi
cmp dword [edi + 0x38], 0x10
jne 0x515193
push 0
jmp 0x51519d
xor eax, eax
cmp dword [esp + 0x14], eax
setne al
push eax
mov eax, ebp
push ecx
shl eax, 0xa
push edx
add eax, esi
push eax
call fcn.005137a0
mov esi, dword [esp + 0x40]
lea ecx, [ebp + 1]
inc dword [esp + 0x30]
inc ebx
add dword [esp + 0x2c], 0x400
inc esi
mov ebp, dword [esp + 0x30]
add esp, 0x10
mov dword [esp + 0x30], esi
cmp ebx, dword [edi + 0x50]
jb 0x515082
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x14]
inc ebx
mov dword [esp + 0x18], ebx
cmp ebx, dword [edi + 0x30]
jb 0x514f30
mov eax, dword [esp + 0x34]
inc eax
mov dword [esp + 0x34], eax
cmp eax, 4
jb 0x514f10
inc ebp
mov dword [esp + 0x14], ebp
cmp ebp, dword [edi + 0x48]
jb 0x514f02
pop esi
pop ebx
mov ecx, dword [esp + 0xc38]
mov eax, 1
pop edi
pop ebp
xor ecx, esp
call fcn.0057a738
add esp, 0xc34
ret