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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 8
mov eax, dword [ebp + 0x20]
mov ebx, 0xfffffffa
test eax, eax
je 0x401a36
cmp dword [ebp + 0x24], 0x38
jne 0x401a36
cmp byte [eax], 0x31
jne 0x401a36
mov esi, dword [ebp + 8]
test esi, esi
je 0x401abc
mov dword [esi + 0x18], 0
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x401a62
mov ebx, dword [ebp + 0x14]
mov eax, dword [ebp + 0xc]
cmp dword [esi + 0x24], 0
je 0x401a7a
cmp eax, 0xffffffff
mov edi, 6
cmovne edi, eax
test ebx, ebx
jns 0x401a86
cmp ebx, 0xfffffff1
jb 0x401abc
neg ebx
xor edx, edx
mov al, 1
cmp dword [ebp + 0x1c], 4
ja 0x401abc
cmp edi, 9
ja 0x401abc
mov dword [ebp - 0x10], edx
cmp dword [ebp + 0x10], 8
jne 0x401abc
mov edx, dword [ebp + 0x18]
add edx, 0xfffffff6
cmp edx, 0xfffffff7
jb 0x401abc
cmp ebx, 8
jb 0x401abc
cmp ebx, 0xf
ja 0x401abc
mov dword [ebp - 0x14], edi
cmp ebx, 8
sete dl
test dl, al
jne 0x401abc
mov esi, dword [esi + 0x28]
call dword [section..00cfg]
push 0x16c4
push 1
push esi
call ecx
add esp, 0xc
test eax, eax
je 0x401ae0
mov edi, eax
cmp ebx, 8
mov ecx, 9
cmovne ecx, ebx
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], edi
mov dword [edi], eax
mov esi, eax
mov dword [edi + 4], 0x2a
mov eax, dword [ebp - 0x10]
mov dword [edi + 0x18], eax
xor eax, eax
mov dword [edi + 0x1c], eax
mov dword [edi + 0x30], ecx
xor ebx, ebx
inc ebx
shl ebx, cl
mov dword [edi + 0x2c], ebx
lea eax, [ebx - 1]
mov dword [edi + 0x34], eax
mov ecx, dword [ebp + 0x18]
lea eax, [ecx + 7]
mov edx, 0x80
shl edx, cl
mov dword [edi + 0x50], eax
mov dword [edi + 0x4c], edx
dec edx
mov dword [edi + 0x54], edx
mov eax, dword [ebp + 0x18]
add al, 9
movzx eax, al
imul eax, eax, 0xab
shr eax, 9
mov dword [edi + 0x58], eax
mov ecx, dword [esi + 0x20]
mov esi, dword [esi + 0x28]
call dword [section..00cfg]
mov eax, 2
push eax
push ebx
push esi
call ecx
add esp, 0xc
mov dword [edi + 0x38], eax
mov esi, dword [edi + 0x2c]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x20]
mov ebx, dword [eax + 0x28]
call dword [section..00cfg]
mov eax, 2
push eax
push esi
push ebx
call ecx
add esp, 0xc
mov dword [edi + 0x40], eax
mov esi, dword [edi + 0x4c]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x20]
mov ebx, dword [eax + 0x28]
call dword [section..00cfg]
mov eax, 2
push eax
push esi
push ebx
call ecx
add esp, 0xc
mov dword [edi + 0x44], eax
mov ebx, 0x40
mov ecx, dword [ebp + 0x18]
shl ebx, cl
xor eax, eax
mov dword [edi + 0x16c0], eax
mov dword [edi + 0x169c], ebx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x20]
mov esi, dword [eax + 0x28]
call dword [section..00cfg]
push 4
push ebx
push esi
call ecx
add esp, 0xc
mov dword [edi + 8], eax
mov ecx, dword [edi + 0x169c]
lea edx, [ecx*4]
mov dword [edi + 0xc], edx
xor edx, edx
cmp dword [edi + 0x38], edx
je 0x401ac6
cmp dword [edi + 0x40], 0
je 0x401ac6
cmp dword [edi + 0x44], 0
je 0x401ac6
test eax, eax
je 0x401ac6
add eax, ecx
mov dword [edi + 0x1698], eax
lea eax, [ecx + ecx*2]
add eax, 0xfffffffd
mov dword [edi + 0x16a4], eax
mov eax, dword [ebp - 0x14]
mov dword [edi + 0x84], eax
mov eax, dword [ebp + 0x1c]
mov dword [edi + 0x88], eax
mov byte [edi + 0x24], 8
mov esi, dword [ebp + 8]
cmp dword [esi + 0x20], 0
je 0x401abc
cmp dword [esi + 0x24], 0
je 0x401abc
mov edi, dword [esi + 0x1c]
test edi, edi
je 0x401abc
cmp dword [edi], esi
jne 0x401abc
mov eax, dword [edi + 4]
cmp eax, 0x71
jne 0x401a40
xor eax, eax
mov dword [esi + 0x14], eax
mov dword [esi + 8], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x2c], 2
mov dword [edi + 0x14], eax
mov ecx, dword [edi + 8]
mov eax, dword [edi + 0x18]
mov dword [edi + 0x10], ecx
test eax, eax
js 0x401aea
mov ecx, 0x39
mov edx, 0x2a
cmp eax, 2
cmove edx, ecx
mov dword [edi + 4], edx
je 0x401af4
xor eax, eax
push eax
push eax
push eax
call fcn.00403cd0
add esp, 0xc
mov dword [esi + 0x30], eax
mov dword [edi + 0x28], 0xfffffffe
push edi
call fcn.00407200
add esp, 4
mov edi, dword [esi + 0x1c]
mov eax, dword [edi + 0x2c]
mov ecx, dword [edi + 0x44]
add eax, eax
mov dword [edi + 0x3c], eax
mov eax, dword [edi + 0x4c]
mov word [ecx + eax*2 - 2], 0
mov eax, dword [edi + 0x4c]
add eax, eax
add eax, 0xfffffffe
xor ebx, ebx
push eax
push ebx
push dword [edi + 0x44]
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov eax, dword [edi + 0x84]
shl eax, 2
movzx ecx, word [eax + eax*2 + 0x40c5c2]
mov dword [edi + 0x80], ecx
movzx ecx, word [eax + eax*2 + 0x40c5c0]
mov dword [edi + 0x8c], ecx
movzx ecx, word [eax + eax*2 + 0x40c5c4]
mov dword [edi + 0x90], ecx
movzx eax, word [eax + eax*2 + 0x40c5c6]
mov dword [edi + 0x7c], eax
mov dword [edi + 0x6c], ebx
mov dword [edi + 0x5c], ebx
mov dword [edi + 0x74], ebx
mov dword [edi + 0x16b4], ebx
mov eax, 2
mov dword [edi + 0x78], eax
mov dword [edi + 0x60], eax
mov dword [edi + 0x68], ebx
mov dword [edi + 0x48], ebx
mov eax, ebx
add esp, 8
pop esi
pop edi
pop ebx
pop ebp
ret
cmp eax, 0x5a
jg 0x401a95
add eax, 0xffffffd6
cmp eax, 0x1f
ja 0x401abc
mov ecx, 0x88008001
bt ecx, eax
mov ebx, 0xfffffffe
jb 0x40194a
jmp 0x401a36
mov dword [esi + 0x20], 0x401b10
mov ecx, 0x401b10
mov dword [esi + 0x28], 0
jmp 0x401719
mov dword [esi + 0x24], 0x401c60
jmp 0x401729
cmp ebx, 0x10
jae 0x401b03
xor edx, edx
inc edx
xor eax, eax
jmp 0x40174b
cmp eax, 0x29a
je 0x40194a
cmp eax, 0x67
je 0x40194a
mov ebx, 0xfffffffe
cmp eax, 0x5b
je 0x40194a
jmp 0x401a36
mov ebx, 0xfffffffe
jmp 0x401a36
mov dword [edi + 4], 0x29a
mov eax, dword [ebp + 8]
mov dword [eax + 0x18], str.insufficient_memory
push eax
call fcn.00401b30
add esp, 4
mov ebx, 0xfffffffc
jmp 0x401a36
neg eax
mov dword [edi + 0x18], eax
jmp 0x401970
xor eax, eax
push eax
push eax
push eax
call fcn.00403800
jmp 0x401993
add ebx, 0xfffffff0
mov edx, 2
jmp 0x401749