Function at 0x404800
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 0x404b75
cmp dword [ebp + 0x24], 0x38
jne 0x404b75
cmp byte [eax], 0x31
jne 0x404b75
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x404bbc
mov dword [ebx + 0x18], 0
mov ecx, dword [ebx + 0x20]
test ecx, ecx
je 0x404be1
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0xc]
cmp dword [ebx + 0x24], 0
je 0x404bf9
cmp edx, 0xffffffff
mov edi, 6
cmovne edi, edx
test eax, eax
jns 0x404c05
neg eax
xor esi, esi
mov dl, 1
cmp dword [ebp + 0x1c], 4
ja 0x404bbc
cmp edi, 9
ja 0x404bbc
cmp dword [ebp + 0x10], 8
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x14], edi
jne 0x404bbc
mov esi, dword [ebp + 0x18]
lea edi, [esi - 1]
cmp edi, 8
ja 0x404bbc
mov edi, eax
and edi, 0xfffffff8
cmp edi, 8
jne 0x404bbc
cmp eax, 8
mov esi, ebx
sete bl
test bl, dl
jne 0x404bbc
mov edi, dword [esi + 0x28]
cmp eax, 8
mov ebx, 9
cmovne ebx, eax
call dword [section..00cfg]
push 0x16c4
push 1
push edi
call ecx
add esp, 0xc
test eax, eax
je 0x404bda
mov dword [esi + 0x1c], eax
mov dword [eax], esi
mov edi, eax
mov dword [eax + 4], 0x2a
mov eax, dword [ebp - 0x10]
mov ecx, ebx
mov dword [edi + 0x18], eax
xor eax, eax
xor edx, edx
mov dword [edi + 0x1c], eax
mov dword [edi + 0x30], ebx
inc edx
mov ebx, dword [ebp + 0x18]
mov esi, edx
shl esi, cl
lea eax, [esi - 1]
mov dword [edi + 0x2c], esi
mov dword [edi + 0x34], eax
lea ecx, [ebx + 7]
mov eax, edx
mov dword [edi + 0x50], ecx
shl eax, cl
mov dword [edi + 0x4c], eax
dec eax
mov dword [edi + 0x54], eax
mov eax, ebx
add al, 9
movzx eax, al
imul eax, eax, 0xab
shr eax, 9
mov dword [edi + 0x58], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x20]
mov eax, dword [eax + 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 edx, dword [ebp + 8]
mov dword [edi + 0x38], eax
mov eax, dword [edi + 0x2c]
mov ecx, dword [edx + 0x20]
mov esi, dword [edx + 0x28]
mov dword [ebp - 0x10], eax
call dword [section..00cfg]
mov eax, 2
push eax
push dword [ebp - 0x10]
push esi
call ecx
add esp, 0xc
mov edx, dword [ebp + 8]
mov dword [edi + 0x40], eax
mov eax, dword [edi + 0x4c]
mov ecx, dword [edx + 0x20]
mov esi, dword [edx + 0x28]
mov dword [ebp - 0x10], eax
call dword [section..00cfg]
mov eax, 2
push eax
push dword [ebp - 0x10]
push esi
call ecx
add esp, 0xc
add bl, 6
mov dword [edi + 0x44], eax
xor eax, eax
mov dword [edi + 0x16c0], eax
xor eax, eax
mov ecx, ebx
mov ebx, dword [ebp + 8]
inc eax
shl eax, cl
mov dword [edi + 0x169c], eax
mov dword [ebp - 0x10], 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 esi, ebx
mov ecx, dword [edi + 0x169c]
lea edx, [ecx*4]
mov dword [edi + 0xc], edx
xor edx, edx
cmp dword [edi + 0x38], edx
je 0x404bc3
cmp dword [edi + 0x40], 0
je 0x404bc3
test eax, eax
je 0x404bc3
cmp dword [edi + 0x44], 0
je 0x404bc3
mov edx, ecx
lea ecx, [ecx + ecx*2]
and edx, 0xfffffffe
add ecx, eax
add edx, eax
mov dword [edi + 0x16a4], edx
mov dword [edi + 0x1698], ecx
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp + 0x1c]
mov dword [edi + 0x84], edx
mov dword [edi + 0x88], ecx
mov byte [edi + 0x24], 8
cmp dword [esi + 0x20], 0
je 0x404bbc
cmp dword [esi + 0x24], 0
je 0x404bbc
mov edi, dword [esi + 0x1c]
test edi, edi
je 0x404bbc
cmp dword [edi], esi
jne 0x404bbc
mov eax, dword [edi + 4]
cmp eax, 0x71
jne 0x404b7f
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 eax, dword [edi + 0x18]
mov ecx, dword [edi + 8]
test eax, eax
mov dword [edi + 0x10], ecx
js 0x404c1b
test eax, eax
mov ecx, 0x71
mov edx, 0x2a
cmove edx, ecx
cmp eax, 2
mov ecx, 0x39
cmovne ecx, edx
mov dword [edi + 4], ecx
je 0x404c25
xor eax, eax
push eax
push eax
push eax
call fcn.00404290
add esp, 0xc
xor ebx, ebx
mov dword [esi + 0x30], eax
mov dword [edi + 0x28], ebx
push edi
call fcn.00407480
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 + 0x40d122]
mov dword [esi + 0x80], ecx
movzx ecx, word [eax + eax*2 + 0x40d120]
mov dword [esi + 0x8c], ecx
movzx ecx, word [eax + eax*2 + 0x40d124]
movzx eax, word [eax + eax*2 + 0x40d126]
mov dword [esi + 0x90], ecx
mov ecx, 2
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 dword [esi + 0x78], ecx
mov dword [esi + 0x60], ecx
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 0x404b98
cmp eax, 0x29a
mov ebx, 0xfffffffe
je 0x404a84
jmp 0x404b75
lea ecx, [eax - 0x2a]
cmp ecx, 0x1f
ja 0x404bae
mov edx, 0x88008001
bt edx, ecx
jb 0x404a84
cmp eax, 0x5b
je 0x404a84
cmp eax, 0x67
jmp 0x404b8b
mov ebx, 0xfffffffe
jmp 0x404b75
mov dword [edi + 4], 0x29a
mov dword [esi + 0x18], str.insufficient_memory
push esi
call fcn.00404c40
add esp, 4
mov ebx, 0xfffffffc
jmp 0x404b75
mov ecx, 0x409520
mov dword [ebx + 0x20], 0x409520
mov dword [ebx + 0x28], 0
jmp 0x404849
mov dword [ebx + 0x24], 0x409540
jmp 0x404859
xor edx, edx
cmp eax, 0xf
lea esi, [eax - 0x10]
setg dl
cmovg eax, esi
mov esi, edx
inc esi
jmp 0x404872
neg eax
mov dword [edi + 0x18], eax
jmp 0x404aaa
xor eax, eax
push eax
push eax
push eax
call fcn.00404540
jmp 0x404ad7