Function at 0x401a90
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.00402d90
add esp, 4
and eax, 0xff
test eax, eax
je 0x401aba
mov eax, 1
jmp 0x401d6d
mov ecx, dword [0x406064]
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 0x401b24
call fcn.00404010
mov edx, dword [ebp - 4]
mov word [edx], 0x5a4d
mov dword [ebp - 0x218], 0
jmp 0x401b3f
mov eax, dword [ebp - 0x218]
add eax, 1
mov dword [ebp - 0x218], eax
cmp dword [ebp - 0x218], 0xa
jge 0x401b67
push 0xffff
push 0
call fcn.00401720
add esp, 8
mov ecx, dword [ebp - 0x218]
mov edx, dword [ebp - 4]
mov word [edx + ecx*2 + 0x28], ax
jmp 0x401b30
lea eax, [ebp - 0x10c]
push eax
push 0x104
call fcn.00401ea0
add esp, 8
mov byte [ebp - 0x334], 0x5c
push 0xa
lea ecx, [ebp - 0x333]
push ecx
call fcn.00401800
add esp, 8
push 0x42ea40
lea edx, [ebp - 0x334]
push edx
call fcn.004027b0
add esp, 8
lea eax, [ebp - 0x334]
push eax
lea ecx, [ebp - 0x10c]
push ecx
call fcn.004027b0
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 0x401bf2
xor eax, eax
jmp 0x401d6d
mov eax, dword [0x42ea34]
mov dword [ebp - 0x224], eax
mov ecx, dword [0x42ea38]
mov dword [ebp - 0x220], ecx
mov dx, word [0x42ea3c]
mov word [ebp - 0x21c], dx
lea eax, [ebp - 0x224]
push eax
call fcn.004018d0
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.00401720
add esp, 8
mov esi, eax
shl esi, 0x14
push 0x61a8
push 0
call fcn.00401720
add esp, 8
lea edx, [esi + eax + 0x46]
mov dword [ebp - 0x230], edx
mov eax, dword [0x406064]
mov ecx, dword [eax + 0x5fc]
mov dword [ebp - 0x340], ecx
mov edx, dword [ebp - 8]
and edx, 0xff
test edx, edx
jne 0x401cd9
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.00401720
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 0x401d4f
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x10c]
push ecx
call dword [0x42f11c]
mov dword [ebp - 0x344], eax
lea edx, [ebp - 0x10c]
push edx
call fcn.004016e0
add esp, 4
jmp 0x401d68
lea eax, [ebp - 0x10c]
push eax
push 0x42ea30
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