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

Disassembly:
sub esp, 0x20
xor eax, eax
push ebx
mov dword [esp + 4], eax
mov dword [esp + 8], eax
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x28]
push ebp
push esi
mov ebx, dword [eax + 0x368c]
push edi
mov dword [esp + 0x28], 0xffffffff
call fcn.004b7ce6
and eax, 0xffff
mov dword [esp + 0x2c], eax
call fcn.004b7ce6
mov esi, eax
push 0x200
and esi, 0xffff
mov dword [esp + 0x24], esi
call fcn.00487e70
push 0x200
mov ebp, eax
call fcn.00487e70
mov edi, eax
push 0x200
mov dword [esp + 0x24], edi
call fcn.00487e70
add esp, 0xc
mov dword [esp + 0x24], eax
test ebp, ebp
je 0x40cdbd
test edi, edi
je 0x40cdbd
test eax, eax
je 0x40cdbd
mov edx, dword [ebx + 0x78]
mov eax, dword [edx + 4]
test eax, eax
je 0x40c986
mov ecx, 0x80
mov esi, eax
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x20]
mov edx, dword [edx + 8]
test edx, edx
je 0x40c9a0
mov ecx, 0x80
mov esi, edx
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x20]
cmp dword [esp + 0x38], 1
jne 0x40ca66
mov eax, 0x80808081
mov dword [esp + 0x20], edi
mul dword [esp + 0x40]
mov ecx, edx
mov eax, 0x4104105
shr ecx, 7
mul ecx
mov eax, dword [esp + 0x3c]
sub ecx, edx
shr ecx, 1
add ecx, edx
mov byte [edi + 0x1fe], 0x55
shr ecx, 5
dec ecx
cmp eax, 3
mov byte [edi + 0x1ff], 0xaa
mov byte [edi + 0x1be], 0x80
mov byte [edi + 0x1bf], 1
mov byte [edi + 0x1c0], 1
mov byte [edi + 0x1c1], 0
jne 0x40ca0a
mov byte [edi + 0x1c2], 0xc
jmp 0x40ca1f
cmp eax, 2
jne 0x40ca18
mov byte [edi + 0x1c2], 0xe
jmp 0x40ca1f
mov byte [edi + 0x1c2], 1
mov eax, dword [esp + 0x40]
mov edx, ecx
shr edx, 2
or dl, 0x3f
mov byte [edi + 0x1c5], cl
mov byte [edi + 0x1c4], dl
mov edx, dword [esp + 0x34]
mov ecx, 0x3f
add eax, 0xffffffc1
mov byte [edi + 0x1c3], 0xfe
mov dword [edi + 0x1c6], ecx
mov dword [edi + 0x1ca], eax
mov dword [esp + 0x10], ecx
mov dword [edx + 0x36b0], ecx
mov dword [esp + 0x40], eax
jmp 0x40ca6a
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x10]
mov dword [ebx + 0x30], 1
mov dword [ebx + 0x34], ecx
mov cl, byte [ebp + 3]
test cl, cl
mov byte [ebp], 0xeb
mov byte [ebp + 1], 0x3c
mov byte [ebp + 2], 0x90
jne 0x40ca9d
mov edx, dword [str.MSWIN4.1]
mov dword [ebp + 3], edx
mov ecx, dword [0x50fd44]
mov dword [ebp + 7], ecx
mov ecx, dword [esp + 0x44]
mov edx, 0x200
mov word [ebp + 0xb], dx
mov byte [ebp + 0xd], cl
mov di, word [ebx + 0x30]
mov word [ebp + 0x11], dx
xor edx, edx
cmp eax, 0x10000
mov word [ebp + 0xe], di
mov byte [ebp + 0x10], 2
mov word [ebp + 0x13], dx
mov dword [ebp + 0x20], edx
jae 0x40cad3
mov word [ebp + 0x13], ax
jmp 0x40cad6
mov dword [ebp + 0x20], eax
mov dl, byte [0x50e7ec]
mov byte [ebp + 0x15], dl
mov edx, dword [esp + 0x3c]
push edx
push ecx
push eax
call fcn.0040c8a0
mov edx, dword [esp + 0x38]
and eax, 0xffff
mov dword [esp + 0x50], eax
mov word [ebp + 0x16], ax
mov word [ebp + 0x18], 0x3f
mov word [ebp + 0x1a], 0xff
mov eax, dword [ebx + 0x34]
add esp, 0xc
shl esi, 0x10
mov dword [ebp + 0x1c], eax
mov cl, byte [0x50e7ed]
or esi, edx
mov edx, 0x20202020
mov dword [ebp + 0x27], esi
lea esi, [ebp + 0x2b]
mov eax, esi
mov byte [ebp + 0x24], cl
mov byte [ebp + 0x25], 0
mov byte [ebp + 0x26], 0x29
mov dword [eax], edx
mov dword [eax + 4], edx
mov word [eax + 8], dx
mov byte [eax + 0xa], dl
mov eax, dword [esp + 0x48]
test eax, eax
je 0x40cb72
mov ecx, dword [0x548c7c]
push 0x40000
push 0
push ecx
push 0xffffffffffffffff
push eax
call fcn.00420f00
mov edx, dword [0x548c7c]
push 0xb
push edx
push esi
call fcn.0041c030
add esp, 0x20
jmp 0x40cb95
mov eax, dword [str.NEW_DISK]
mov dword [esi], eax
mov ecx, dword [0x50fd38]
mov dword [esi + 4], ecx
mov dx, word [0x50fd3c]
mov word [esi + 8], dx
mov al, byte [0x50fd3e]
mov byte [esi + 0xa], al
mov eax, dword [esp + 0x3c]
lea edi, [ebx + 0x7c]
cmp eax, 1
mov ecx, 6
mov esi, 0x50fc30
je 0x40cbb0
mov esi, 0x50fc48
rep movsd dword es:[edi], dword [esi]
mov cl, byte [0x50e7ec]
mov esi, dword [ebx + 0x90]
mov byte [ebx + 0x7c], cl
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [ebp + 0x36]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
xor edx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov word [ebp + 0x1fe], 0xaa55
mov ax, word [ebp + 0xe]
xor ecx, ecx
mov dword [ebx + 0x30], eax
mov cl, byte [ebp + 0x10]
mov dx, word [ebp + 0x16]
imul ecx, edx
add ecx, eax
xor eax, eax
mov dword [ebx + 8], ecx
mov ax, word [ebp + 0x11]
xor ecx, ecx
mov esi, dword [esp + 0x40]
mov cx, word [ebp + 0xb]
shl eax, 5
lea eax, [eax + ecx - 1]
cdq
idiv ecx
xor ecx, ecx
xor edx, edx
mov dword [ebx + 0xc], eax
mov cl, byte [ebp + 0x10]
mov dx, word [ebp + 0x16]
imul ecx, edx
mov edx, dword [ebx + 8]
sub esi, ecx
xor ecx, ecx
mov cx, word [ebp + 0xe]
sub esi, ecx
mov ecx, dword [ebx + 0x30]
sub esi, eax
add eax, edx
add eax, ecx
xor ecx, ecx
mov dword [ebx + 4], eax
mov cl, byte [ebp + 0xd]
mov eax, esi
xor edx, edx
div ecx
mov edx, dword [esp + 0x40]
mov esi, 1
mov dword [ebx + 0x1c], edx
mov dword [ebx + 0x10], eax
mov eax, dword [esp + 0x38]
cmp eax, esi
jne 0x40ccaf
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x34]
push esi
push eax
push 0
push edi
call fcn.0040b630
add esp, 0x10
cmp eax, esi
jne 0x40cdb9
cmp dword [esp + 0x10], esi
jle 0x40ccb3
mov ecx, dword [esp + 0x24]
push 1
push ecx
push esi
push edi
call fcn.0040b630
add esp, 0x10
cmp eax, 1
jne 0x40cdb9
mov eax, dword [esp + 0x10]
inc esi
cmp esi, eax
jl 0x40cc8a
jmp 0x40ccb3
mov edi, dword [esp + 0x34]
mov edx, dword [esp + 0x10]
push 1
push ebp
push edx
push edi
call fcn.0040b630
add esp, 0x10
cmp eax, 1
jne 0x40cdb9
mov esi, dword [esp + 0x44]
mov eax, esi
shl eax, 9
push eax
call fcn.00487e70
xor edi, edi
add esp, 4
cmp eax, edi
mov dword [esp + 0x14], eax
je 0x40cdb9
cmp dword [esp + 0x3c], 1
jne 0x40cd22
mov eax, dword [esp + 0x14]
mov dword [esp + 0x40], edi
mov word [eax], di
mov cx, word [ebx + 0x7c]
mov word [eax], cx
and word [eax + 1], 0xf
mov dx, word [ebx + 0x80]
mov cx, word [eax + 1]
shl dx, 4
or edx, ecx
mov word [eax + 1], dx
jmp 0x40cd42
mov eax, dword [esp + 0x14]
mov cx, word [ebx + 0x7c]
mov dword [esp + 0x40], edi
mov word [eax], cx
mov dx, word [ebx + 0x80]
mov word [eax + 2], dx
jmp 0x40cd42
mov eax, dword [esp + 0x14]
mov ecx, dword [ebx + 0x30]
mov edx, dword [esp + 0x10]
push esi
push eax
mov eax, edi
add eax, ecx
mov ecx, dword [esp + 0x3c]
add eax, edx
push eax
push ecx
call fcn.0040b630
add esp, 0x10
cmp eax, esi
jne 0x40cdb9
mov eax, dword [esp + 0x40]
add edi, esi
inc eax
cmp eax, 2
mov dword [esp + 0x40], eax
jl 0x40cd3e
mov edx, dword [ebx + 0xc]
shl edx, 9
push edx
call fcn.00487e70
add esp, 4
mov dword [esp + 0x1c], eax
test eax, eax
je 0x40cdb9
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 8]
mov ecx, dword [esp + 0x1c]
push eax
mov eax, dword [esp + 0x14]
push ecx
add edx, eax
mov eax, dword [esp + 0x3c]
push edx
push eax
call fcn.0040b630
mov ecx, dword [ebx + 0xc]
add esp, 0x10
cmp eax, ecx
jne 0x40cdb9
mov dword [esp + 0x28], 0
mov edi, dword [esp + 0x18]
push ebp
call fcn.00487ea0
push edi
call fcn.00487ea0
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.00487ea0
mov edx, dword [esp + 0x20]
push edx
call fcn.00487ea0
mov eax, dword [esp + 0x2c]
push eax
call fcn.00487ea0
mov eax, dword [esp + 0x3c]
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret