Function at 0x40cc90
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4c
push ebx
push esi
mov esi, ecx
test esi, esi
push edi
je 0x40cea7
test eax, eax
je 0x40cea7
push 0
push 0
push 2
push 0
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
xor eax, eax
cmp ebx, 0xffffffff
je 0x40cea9
mov dword [esp + 0x2c], eax
mov word [esp + 0x30], ax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
lea eax, [esp + 0x44]
push eax
push esi
call dword [sym.imp.USER32.dll_GetIconInfo]
mov ecx, dword [esp + 0x50]
mov eax, 1
lea edi, [esp + 0x1c]
lea esi, [esp + 0x24]
call fcn.0040cbf0
mov ecx, dword [esp + 0x54]
mov eax, 0x20
lea edi, [esp + 0x18]
lea esi, [esp + 0x14]
call fcn.0040cbf0
mov ecx, dword [esp + 0x24]
push ecx
call fcn.0047e793
mov edx, dword [esp + 0x18]
add esp, 4
mov edi, eax
push edx
mov dword [esp + 0x2c], edi
call fcn.0047e793
mov esi, eax
mov eax, dword [esp + 0x20]
add esp, 4
push eax
call fcn.0047e793
mov ecx, dword [esp + 0x1c]
add esp, 4
push ecx
mov dword [esp + 0x28], eax
call fcn.0047e793
mov edx, dword [esp + 0x28]
add esp, 4
mov dword [esp + 0x20], eax
push 1
mov eax, edi
mov edi, dword [esp + 0x54]
push edx
call fcn.0040cc50
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x54]
push 0x20
push eax
mov eax, esi
call fcn.0040cc50
push 0
lea ecx, [esp + 0x14]
push ecx
push 6
lea edx, [esp + 0x38]
mov eax, 1
push edx
push ebx
mov word [esp + 0x42], ax
mov word [esp + 0x44], ax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, dword [esp + 0x28]
and edi, eax
mov al, byte [esi + 4]
mov byte [esp + 0x34], al
mov cl, byte [esi + 8]
mov eax, dword [esp + 0x14]
mov byte [esp + 0x35], cl
mov dx, word [esi + 0xe]
imul dx, word [esi + 0xc]
mov ecx, dword [esp + 0x18]
add eax, ecx
add eax, dword [esp + 0x1c]
mov word [esp + 0x36], dx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], 0x16
push 0
lea edx, [esp + 0x14]
push edx
push 0x10
lea eax, [esp + 0x40]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esi + 8]
push 0
lea edx, [esp + 0x14]
push edx
and edi, eax
mov eax, dword [esp + 0x1c]
push eax
push esi
add ecx, ecx
push ebx
mov dword [esi + 8], ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [esp + 0x18]
push 0
lea ecx, [esp + 0x14]
push ecx
and edi, eax
mov eax, dword [esp + 0x28]
push edx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [esp + 0x1c]
push 0
lea ecx, [esp + 0x14]
push ecx
and edi, eax
mov eax, dword [esp + 0x2c]
push edx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
and edi, eax
call fcn.0047e11e
mov ecx, dword [esp + 0x2c]
add esp, 4
push ecx
call fcn.0047e11e
mov edx, dword [esp + 0x24]
add esp, 4
push edx
call fcn.0047e11e
mov eax, dword [esp + 0x28]
add esp, 4
push eax
call fcn.0047e11e
mov ecx, dword [esp + 0x58]
mov esi, dword [sym.imp.GDI32.dll_DeleteObject]
add esp, 4
push ecx
call esi
mov edx, dword [esp + 0x50]
push edx
call esi
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret