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

Disassembly:
mov eax, 0xc34
call fcn.0057a200
mov eax, dword [0x5faea4]
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 0x51495d
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 0x51493f
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 0x5146b7
sub eax, 1
mov eax, dword [esp + 0x10]
jne 0x514734
test ebp, ebp
jne 0x514734
cmp al, 2
jae 0x514734
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 0x51478c
test al, al
jne 0x51478c
lea ebx, [ebp + 2]
sub esi, 1
je 0x51474b
sub esi, 1
jne 0x51478c
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.00512ef0
push 0
lea eax, [esp + 0x454]
push eax
push eax
lea eax, [esp + 0x85c]
push eax
call fcn.00512ef0
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 0x5147b7
dec ecx
add ecx, esi
jmp 0x5147ba
lea ecx, [esi - 1]
cmp ebx, ebp
jae 0x514925
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.00512ec0
add esp, 0xc
test eax, eax
je 0x51484d
mov esi, ebx
and esi, 0x7f
jne 0x514839
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.00512ef0
push esi
lea eax, [esp + 0x454]
push eax
push eax
lea eax, [esp + 0x85c]
push eax
call fcn.00512ef0
add esp, 0x20
mov eax, dword [esp + esi*8 + 0x440]
mov dword [esp + 0x28], eax
mov eax, dword [esp + esi*8 + 0x444]
jmp 0x514860
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.0057abd0
cmp dword [esp + 0x14], 0
mov ecx, eax
mov dword [esp + 0x2c], ecx
jne 0x514898
cmp byte [esp + 0x10], 0
jne 0x514898
mov eax, dword [esp + 0x18]
mov dword [esp + 0x2c], eax
mov eax, 1
mov dword [esp + 0x3c], 0
jmp 0x5148a9
cmp ecx, dword [esp + 0x18]
jne 0x5148a7
test edx, edx
jne 0x5148a7
lea eax, [edx + 1]
jmp 0x5148a9
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.00514e00
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 0x5148e3
push 0
jmp 0x5148ed
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.00512ef0
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 0x5147d2
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x14]
inc ebx
mov dword [esp + 0x18], ebx
cmp ebx, dword [edi + 0x30]
jb 0x514680
mov eax, dword [esp + 0x34]
inc eax
mov dword [esp + 0x34], eax
cmp eax, 4
jb 0x514660
inc ebp
mov dword [esp + 0x14], ebp
cmp ebp, dword [edi + 0x48]
jb 0x514652
pop esi
pop ebx
mov ecx, dword [esp + 0xc38]
mov eax, 1
pop edi
pop ebp
xor ecx, esp
call fcn.00579e58
add esp, 0xc34
ret