Function at 0x40d74c
Capabilities:
Write file on windows

Disassembly:
push edi
push esi
push ebx
sub esp, 0x460
mov eax, dword [esp + 0x478]
mov byte [esp + 0x3c], al
mov eax, dword [0x41e7c0]
cmp eax, 1
je 0x40d773
mov eax, dword [0x41e7c0]
test eax, eax
je 0x40d77d
mov eax, 0xffffffff
jmp 0x40da0e
lea eax, [esp + 0x4c]
mov dword [esp], eax
call sub.KERNEL32.DLL_GetLocalTime
sub esp, 4
movzx eax, word [esp + 0x52]
movzx edx, ax
mov eax, dword [0x4245a4]
cmp edx, eax
je 0x40d826
movzx eax, byte [esp + 0x3c]
xor eax, 1
test al, al
je 0x40d826
movzx eax, word [esp + 0x52]
movzx eax, ax
mov dword [0x4245a4], eax
movzx eax, word [esp + 0x4c]
movzx ecx, ax
movzx eax, word [esp + 0x4e]
movzx edx, ax
movzx eax, word [esp + 0x52]
movzx eax, ax
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x41e720
mov dword [esp + 8], str._s_.2d__.2d__.4d
mov dword [esp + 4], 0x104
mov dword [esp], 0x4244a0
call fcn.00419fa8
mov eax, dword [0x41e7c4]
cmp eax, 0xffffffff
je 0x40d81c
mov eax, dword [0x41e7c4]
mov dword [esp], eax
call sub.KERNEL32.DLL_CloseHandle
sub esp, 4
mov dword [0x41e7c4], 0xffffffff
cmp byte [esp + 0x3c], 0
je 0x40d867
mov eax, dword [0x41e7c4]
cmp eax, 0xffffffff
je 0x40d847
mov eax, dword [0x41e7c4]
mov dword [esp], eax
call sub.KERNEL32.DLL_CloseHandle
sub esp, 4
mov dword [esp], 0x4244a0
call fcn.0040a9af
mov dword [0x41e7c4], 0xffffffff
mov dword [0x424480], 0
mov eax, dword [0x41e7c4]
cmp eax, 0xffffffff
jne 0x40d9ad
mov dword [0x424480], 0
mov dword [esp], 0x41e720
call fcn.0040aa6f
xor eax, 1
test al, al
je 0x40d89e
mov dword [esp], 0x41e720
call fcn.0040ace1
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0x40000000
mov dword [esp], 0x4244a0
call sub.KERNEL32.DLL_CreateFileA
sub esp, 0x1c
mov dword [0x41e7c4], eax
mov eax, dword [0x41e7c4]
cmp eax, 0xffffffff
jne 0x40d8fb
mov dword [0x41e7c0], 1
jmp 0x40da09
mov eax, dword [0x41e7c4]
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.KERNEL32.DLL_SetFilePointer
sub esp, 0x10
movzx eax, word [esp + 0x58]
movzx edi, ax
movzx eax, word [esp + 0x56]
movzx esi, ax
movzx eax, word [esp + 0x54]
movzx ebx, ax
movzx eax, word [esp + 0x4c]
movzx ecx, ax
movzx eax, word [esp + 0x4e]
movzx edx, ax
movzx eax, word [esp + 0x52]
movzx eax, ax
mov dword [esp + 0x20], edi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], eax
mov dword [esp + 8], str._r_n_r_n_Log_Started______.2d__.2d__d__.2d:_.2d:_.2d__r_n
mov dword [esp + 4], 0x400
lea eax, [esp + 0x5c]
mov dword [esp], eax
call fcn.00419fa8
mov dword [esp + 0x45c], eax
mov dword [esp + 8], 0
mov eax, dword [esp + 0x45c]
mov dword [esp + 4], eax
lea eax, [esp + 0x5c]
mov dword [esp], eax
call fcn.0040d74c
cmp dword [esp + 0x474], 0
jle 0x40da09
mov eax, dword [esp + 0x474]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x470]
mov dword [esp], eax
call fcn.0040d70c
mov edx, dword [esp + 0x474]
mov eax, dword [0x41e7c4]
mov dword [esp + 0x10], 0
lea ecx, [esp + 0x48]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
mov edx, dword [esp + 0x470]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.KERNEL32.DLL_WriteFile
sub esp, 0x14
jmp 0x40da0e
mov eax, 0
add esp, 0x460
pop ebx
pop esi
pop edi
ret