Function at 0x401078
Capabilities:
Write file on windows

Disassembly:
jmp 0x409ca0
push 0xffffffffffffffff
push 0x498698
mov eax, dword fs:[0]
push eax
sub esp, 0x44
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4c6dd4]
xor eax, esp
push eax
lea eax, [esp + 0x58]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0x28], esi
push ecx
mov ecx, esp
mov dword [esp + 0x24], esp
xor ebp, ebp
push 0x4a310a
mov dword [esp + 0x68], ebp
call fcn.004012d5
push ecx
mov ecx, esp
mov dword [esp + 0x20], esp
push str..FileToEmail.cpp
mov byte [esp + 0x6c], 1
call fcn.004012d5
push ecx
mov ecx, esp
mov dword [esp + 0x20], esp
push str.CreateOsInfoFile
mov byte [esp + 0x70], 2
call fcn.004012d5
lea ecx, [esp + 0x3c]
mov byte [esp + 0x6c], 0
call fcn.0040130c
mov byte [esp + 0x60], 3
call fcn.004141fe
xor ecx, ecx
cmp eax, ebp
setne cl
cmp ecx, ebp
jne 0x409d3d
push 0x80004005
call fcn.004013ed
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov byte [esp + 0x60], 4
call fcn.004141fe
xor ecx, ecx
cmp eax, ebp
setne cl
cmp ecx, ebp
jne 0x409d6c
push 0x80004005
call fcn.004013ed
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x20]
push eax
mov ecx, esi
mov byte [esp + 0x6c], 5
mov dword [esp + 0x2c], ebp
call fcn.004014ce
mov esi, dword [esp + 0x18]
cmp dword [esi - 0xc], ebp
jne 0x409e47
push 0xffffffffffffffff
push ecx
mov ecx, esp
mov dword [esp + 0x74], esp
push str.Os_info_not_found
call fcn.004012d5
lea ecx, [esp + 0x38]
call fcn.0040104b
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x60], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409de9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
mov byte [esp + 0x60], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409e0a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x60], 0
call fcn.004013f2
mov eax, dword [esp + 0x68]
add eax, 0xfffffff0
mov dword [esp + 0x60], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409e40
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
jmp 0x40a0be
push 0x4a36ec
lea ecx, [esp + 0x20]
call fcn.004012d5
mov ebx, dword [esp + 0x68]
mov esi, dword [esp + 0x6c]
push str.HpOsInfo
push ebx
push str._s_s.txt
push esi
mov byte [esp + 0x70], 6
call fcn.0040105f
add esp, 0x10
lea ecx, [esp + 0x40]
call fcn.00419801
mov eax, dword [esi]
push ebp
push eax
lea ecx, [esp + 0x48]
mov byte [esp + 0x68], 7
call fcn.0041988d
test eax, eax
je 0x409ecf
mov ecx, dword [esp + 0x1c]
push ecx
push str.HpOsInfo
push ebx
push str._s_s_s.txt
push esi
call fcn.0040105f
add esp, 0x14
push 1
push 0x4a36ec
lea ecx, [esp + 0x24]
call fcn.004010ff
mov eax, dword [esi]
push ebp
push eax
lea ecx, [esp + 0x48]
call fcn.0041988d
test eax, eax
jne 0x409e95
mov eax, dword [esi]
push ebp
push 0x80
push 1
push ebp
push ebp
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x409f0e
push eax
push ecx
mov ecx, esp
mov dword [esp + 0x74], esp
push str.Os_info_file_creation_failed
call fcn.004012d5
lea ecx, [esp + 0x38]
call fcn.0040104b
jmp 0x40a00d
call fcn.004141fe
xor ecx, ecx
cmp eax, ebp
setne cl
cmp ecx, ebp
jne 0x409f28
push 0x80004005
call fcn.004013ed
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x6c], eax
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
push ecx
push edx
lea eax, [esp + 0x74]
push str._s_____s_
push eax
mov byte [esp + 0x70], 8
call fcn.0040105f
mov eax, dword [esp + 0x7c]
mov ecx, dword [eax - 0xc]
add esp, 0x10
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
lea edx, [esp + 0x28]
push edx
push ecx
push eax
push edi
call ebp
test eax, eax
jne 0x409f8f
push ecx
mov ecx, esp
mov dword [esp + 0x30], esp
push str.Trouble_writing_file
call fcn.004012d5
lea ecx, [esp + 0x34]
call fcn.00401253
push 4
push str._r_n_r_n
lea ecx, [esp + 0x74]
call fcn.00401032
mov ebx, dword [esp + 0x6c]
mov eax, dword [ebx - 0xc]
push 0
lea ecx, [esp + 0x28]
push ecx
push eax
push ebx
push edi
call ebp
test eax, eax
jne 0x409fd0
push ecx
mov ecx, esp
mov dword [esp + 0x30], esp
push str.Trouble_adding_return_char_to_file
call fcn.004012d5
lea ecx, [esp + 0x34]
call fcn.00401253
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x20], 2
jne 0x409fe8
mov ecx, dword [esp + 0x28]
push esi
call fcn.004010dc
lea eax, [ebx - 0x10]
mov byte [esp + 0x60], 7
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40a009
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [esp + 0x68]
lea ecx, [esp + 0x40]
mov byte [esp + 0x60], 6
call fcn.00419825
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov byte [esp + 0x60], 5
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a040
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x60], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a065
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x60], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a08a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x60], 0
call fcn.004013f2
lea eax, [ebx - 0x10]
mov dword [esp + 0x60], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a0bc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, 1
mov ecx, dword [esp + 0x58]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret 8