Function at 0x401c80
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 0x401feb
cmp dword [ebp + 0x24], 0x38
jne 0x401feb
cmp byte [eax], 0x31
jne 0x401feb
mov edi, dword [ebp + 8]
test edi, edi
je 0x40203d
mov dword [edi + 0x18], 0
mov ecx, dword [edi + 0x20]
test ecx, ecx
je 0x402062
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0xc]
cmp dword [edi + 0x24], 0
je 0x40207a
cmp edx, 0xffffffff
mov esi, 6
cmovne esi, edx
mov dword [ebp - 0x14], esi
test eax, eax
jns 0x402086
neg eax
xor esi, esi
mov dl, 1
cmp eax, 8
sete bl
test bl, dl
jne 0x40203d
cmp dword [ebp + 0x1c], 4
ja 0x40203d
cmp dword [ebp - 0x14], 9
ja 0x40203d
cmp dword [ebp + 0x10], 8
jne 0x40203d
mov edx, dword [ebp + 0x18]
dec edx
cmp edx, 8
ja 0x40203d
mov edx, eax
and edx, 0xfffffff8
cmp edx, 8
jne 0x40203d
cmp eax, 8
mov edx, 9
cmovne edx, eax
mov dword [ebp - 0x10], edx
mov ebx, edi
mov edi, dword [edi + 0x28]
call dword [section..00cfg]
push 0x16c4
push 1
push edi
call ecx
add esp, 0xc
test eax, eax
je 0x40205b
mov edi, eax
mov dword [ebx + 0x1c], eax
mov dword [eax], ebx
mov dword [eax + 4], 0x2a
mov dword [eax + 0x18], esi
xor edx, edx
inc edx
mov esi, edx
mov ecx, dword [ebp - 0x10]
shl esi, cl
mov eax, dword [ebp + 0x18]
lea ecx, [eax + 7]
mov eax, edx
shl eax, cl
xor edx, edx
mov dword [edi + 0x1c], edx
mov edx, dword [ebp - 0x10]
mov dword [edi + 0x30], edx
mov dword [edi + 0x2c], esi
lea edx, [esi - 1]
mov dword [edi + 0x34], edx
mov dword [edi + 0x50], ecx
mov dword [edi + 0x4c], eax
dec eax
mov dword [edi + 0x54], eax
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 [ebx + 0x20]
mov eax, dword [ebx + 0x28]
mov dword [ebp - 0x10], eax
call dword [section..00cfg]
mov eax, 2
push eax
push esi
push dword [ebp - 0x10]
call ecx
add esp, 0xc
mov dword [edi + 0x38], eax
mov eax, dword [edi + 0x2c]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebx + 0x20]
mov esi, dword [ebx + 0x28]
call dword [section..00cfg]
mov eax, 2
push eax
push dword [ebp - 0x10]
push esi
call ecx
add esp, 0xc
mov dword [edi + 0x40], eax
mov eax, dword [edi + 0x4c]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebx + 0x20]
mov esi, dword [ebx + 0x28]
call dword [section..00cfg]
mov eax, 2
push eax
push dword [ebp - 0x10]
push esi
call ecx
add esp, 0xc
mov dword [edi + 0x44], eax
mov ecx, dword [ebp + 0x18]
add cl, 6
xor eax, eax
inc eax
shl eax, cl
mov dword [ebp - 0x10], eax
xor ecx, ecx
mov dword [edi + 0x16c0], ecx
mov dword [edi + 0x169c], eax
mov ecx, dword [ebx + 0x20]
mov esi, dword [ebx + 0x28]
call dword [section..00cfg]
push 4
push dword [ebp - 0x10]
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
mov esi, ebx
je 0x402044
cmp dword [edi + 0x40], 0
je 0x402044
test eax, eax
je 0x402044
cmp dword [edi + 0x44], 0
je 0x402044
mov edx, ecx
and edx, 0xfffffffe
add edx, eax
mov dword [edi + 0x16a4], edx
lea ecx, [ecx + ecx*2]
add ecx, eax
mov dword [edi + 0x1698], ecx
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
cmp dword [esi + 0x20], 0
je 0x40203d
cmp dword [esi + 0x24], 0
je 0x40203d
mov edi, dword [esi + 0x1c]
test edi, edi
je 0x40203d
cmp dword [edi], esi
jne 0x40203d
mov eax, dword [edi + 4]
cmp eax, 0x71
jne 0x401ff5
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 0x402098
test eax, eax
mov ecx, 0x71
mov edx, 0x2a
cmove edx, ecx
mov ecx, 0x39
cmp eax, 2
cmovne ecx, edx
mov dword [edi + 4], ecx
je 0x4020a2
xor eax, eax
push eax
push eax
push eax
call fcn.00404420
add esp, 0xc
mov dword [esi + 0x30], eax
xor ebx, ebx
mov dword [edi + 0x28], ebx
push edi
call fcn.00406d00
add esp, 4
mov esi, dword [esi + 0x1c]
mov eax, dword [esi + 0x2c]
mov ecx, dword [esi + 0x44]
add eax, eax
mov dword [esi + 0x3c], eax
mov eax, dword [esi + 0x4c]
mov word [ecx + eax*2 - 2], 0
mov eax, dword [esi + 0x4c]
lea eax, [eax + eax - 2]
push eax
push ebx
push dword [esi + 0x44]
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov eax, dword [esi + 0x84]
shl eax, 2
movzx ecx, word [eax + eax*2 + 0x40d152]
mov dword [esi + 0x80], ecx
movzx ecx, word [eax + eax*2 + 0x40d150]
mov dword [esi + 0x8c], ecx
movzx ecx, word [eax + eax*2 + 0x40d154]
mov dword [esi + 0x90], ecx
movzx eax, word [eax + eax*2 + 0x40d156]
mov dword [esi + 0x7c], eax
mov dword [esi + 0x6c], ebx
mov dword [esi + 0x5c], ebx
mov dword [esi + 0x74], ebx
mov dword [esi + 0x16b4], ebx
mov eax, 2
mov dword [esi + 0x78], eax
mov dword [esi + 0x60], eax
mov dword [esi + 0x68], ebx
mov dword [esi + 0x48], ebx
mov eax, ebx
add esp, 8
pop esi
pop edi
pop ebx
pop ebp
ret
cmp eax, 0x299
jle 0x40200e
mov ebx, 0xfffffffe
cmp eax, 0x29a
je 0x401efa
jmp 0x401feb
lea ecx, [eax - 0x2a]
cmp ecx, 0x1f
ja 0x402024
mov edx, 0x88008001
bt edx, ecx
jb 0x401efa
cmp eax, 0x5b
je 0x401efa
mov ebx, 0xfffffffe
cmp eax, 0x67
je 0x401efa
jmp 0x401feb
mov ebx, 0xfffffffe
jmp 0x401feb
mov dword [edi + 4], 0x29a
mov dword [esi + 0x18], str.insufficient_memory
push esi
call fcn.004023d0
add esp, 4
mov ebx, 0xfffffffc
jmp 0x401feb
mov dword [edi + 0x20], 0x4043d0
mov ecx, 0x4043d0
mov dword [edi + 0x28], 0
jmp 0x401cc9
mov dword [edi + 0x24], 0x4043f0
jmp 0x401cd9
cmp eax, 0x10
jl 0x4020b1
add eax, 0xfffffff0
mov esi, 2
jmp 0x401cf3
neg eax
mov dword [edi + 0x18], eax
jmp 0x401f20
xor eax, eax
push eax
push eax
push eax
call fcn.00402510
jmp 0x401f4d
xor esi, esi
inc esi
xor edx, edx
jmp 0x401cf5