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

Disassembly:
push ecx
push ebx
push ebp
mov ebp, dword [esp + 0x10]
push esi
push edi
mov edi, eax
mov eax, dword [esp + 0x1c]
mov edx, 1
cmp dword [eax + 0x18], edx
jne 0x40390f
xor esi, esi
xor ebx, ebx
jmp 0x403918
mov ecx, dword [eax + 4]
mov ebx, edx
shl ebx, cl
xor esi, esi
mov ecx, dword [eax + 8]
shl edx, cl
cmp dword [esp + 0x28], 1
mov dword [esp + 0x18], ebx
jne 0x40394b
cmp dword [eax + 0x10], 3
jne 0x40394b
mov ecx, dword [eax]
cmp ecx, 0x11
jbe 0x4039e0
mov ecx, 0x11
mov eax, 1
shl eax, cl
mov dword [esp + 0x10], eax
jmp 0x403951
xor ecx, ecx
mov dword [esp + 0x10], esi
cmp dword [esp + 0x24], 1
jne 0x40397a
mov eax, 0x6c2278
mov dword [edi + 4], eax
mov dword [edi + 8], eax
mov eax, 1
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], eax
mov dword [edi], 0x6c2279
mov eax, dword [ebp + 8]
mov dword [ebp + 0x10], eax
mov eax, dword [edi]
sub eax, dword [edi + 4]
mov dword [edi + 0x14], esi
mov dword [edi + 0x4c], esi
mov dword [edi + 0x74], esi
mov dword [edi + 0x1c], ecx
mov dword [edi + 0x10], eax
mov dword [edi + 0xc], eax
mov dword [edi + 0x18], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x20]
cmp ecx, 2
lea esi, [eax + edx*4]
mov edx, dword [ebp + 0x14]
mov dword [ebp + 0xc], eax
jge 0x4039d4
cmp ecx, 1
jge 0x4039b0
mov dword [ebp + 0x10], eax
cmp ecx, 2
jge 0x4039cd
mov ebx, edx
and ebx, 3
mov ecx, edx
sub ecx, ebx
mov ebx, dword [esp + 0x18]
mov dword [ebp + 0x14], ecx
cmp ecx, dword [ebp + 0x10]
jae 0x4039cd
mov dword [ebp + 0x10], ecx
mov dword [ebp + 0x20], 2
cmp esi, edx
jbe 0x4039f8
mov byte [ebp + 0x18], 1
xor eax, eax
jmp 0x4039fb
cmp ecx, esi
je 0x40394d
mov eax, 1
shl eax, cl
mov dword [esp + 0x10], eax
jmp 0x403951
mov dword [ebp + 0xc], esi
mov dword [edi + 0x20], eax
mov eax, dword [ebp + 0x20]
cmp eax, 2
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x14]
lea esi, [ecx + ebx*4]
jge 0x403a3a
cmp eax, 1
jge 0x403a1a
mov ebx, dword [ebp + 8]
mov dword [ebp + 0x10], ebx
cmp eax, 2
jge 0x403a33
mov ebx, edx
and ebx, 3
mov eax, edx
sub eax, ebx
mov dword [ebp + 0x14], eax
cmp eax, dword [ebp + 0x10]
jae 0x403a33
mov dword [ebp + 0x10], eax
mov dword [ebp + 0x20], 2
cmp esi, edx
jbe 0x403a46
mov byte [ebp + 0x18], 1
xor eax, eax
jmp 0x403a4b
mov dword [ebp + 0xc], esi
mov eax, ecx
mov edx, dword [esp + 0x10]
mov dword [edi + 0x28], eax
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x20]
cmp eax, 2
lea esi, [ecx + edx*4]
mov edx, dword [ebp + 0x14]
jge 0x403a8e
cmp eax, 1
jge 0x403a6e
mov ebx, dword [ebp + 8]
mov dword [ebp + 0x10], ebx
cmp eax, 2
jge 0x403a87
mov ebx, edx
and ebx, 3
mov eax, edx
sub eax, ebx
mov dword [ebp + 0x14], eax
cmp eax, dword [ebp + 0x10]
jae 0x403a87
mov dword [ebp + 0x10], eax
mov dword [ebp + 0x20], 2
cmp esi, edx
jbe 0x403a9a
mov byte [ebp + 0x18], 1
xor ecx, ecx
jmp 0x403a9d
mov dword [ebp + 0xc], esi
mov dword [edi + 0x24], ecx
cmp byte [ebp + 0x18], 0
je 0x403ab1
pop edi
pop esi
pop ebp
mov eax, 0xffffffc0
pop ebx
pop ecx
ret
mov esi, 1
cmp dword [esp + 0x20], esi
je 0x403adf
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
cmp ecx, eax
jae 0x403ad4
sub eax, ecx
push eax
push 0
push ecx
call fcn.005e4b70
add esp, 0xc
mov eax, dword [ebp + 0xc]
cmp dword [ebp + 0x10], eax
jae 0x403adf
mov dword [ebp + 0x10], eax
cmp dword [esp + 0x28], esi
jne 0x403b3f
mov eax, dword [esp + 0x1c]
cmp dword [eax + 0x18], 7
jl 0x403b3f
mov edx, 0x400
mov ecx, ebp
call fcn.00401100
mov edx, 0x90
mov dword [edi + 0x30], eax
call fcn.00401100
mov edx, 0xd4
mov dword [edi + 0x34], eax
call fcn.00401100
mov edx, 0x80
mov dword [edi + 0x38], eax
call fcn.00401100
mov edx, 0x8008
mov dword [edi + 0x3c], eax
call fcn.00401100
mov edx, 0x1c01c
mov dword [edi + 0x40], eax
call fcn.00401100
mov dword [edi + 0x44], eax
mov esi, dword [esp + 0x1c]
add edi, 0x78
mov ecx, 7
rep movsd dword es:[edi], dword [esi]
movzx eax, byte [ebp + 0x18]
pop edi
neg eax
pop esi
sbb eax, eax
pop ebp
and eax, 0xffffffc0
pop ebx
pop ecx
ret