Function at 0x40e0ad
Capabilities:
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x43c
mov dword [ebp - 0x21c], 0
mov dword [ebp - 0x234], 0
mov dword [ebp - 0x210], 0
mov dword [ebp - 0x214], 0
push 0x104
push 0
lea eax, [ebp - 0x20c]
push eax
call fcn.00410e60
add esp, 0xc
push 0x104
push 0
lea ecx, [ebp - 0x104]
push ecx
call fcn.00410e60
add esp, 0xc
push 0x104
lea edx, [ebp - 0x20c]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x5c
lea eax, [ebp - 0x20c]
push eax
call fcn.00412220
add esp, 8
mov dword [ebp - 0x234], eax
push 0x2e
lea ecx, [ebp - 0x20c]
push ecx
call fcn.00412220
add esp, 8
mov dword [ebp - 0x210], eax
cmp dword [ebp - 0x234], 0
je 0x40e1a8
cmp dword [ebp - 0x210], 0
je 0x40e1a8
mov edx, dword [ebp - 0x210]
sub edx, dword [ebp - 0x234]
mov byte [ebp - 0x230], dl
mov eax, dword [ebp - 0x230]
and eax, 0xff
mov ecx, dword [ebp - 0x234]
mov byte [ecx + eax], 0
mov edx, dword [ebp - 0x234]
push edx
mov eax, dword [0x42cda0]
push eax
push str._s__s_except.log
lea ecx, [ebp - 0x104]
push ecx
call fcn.00410dfc
add esp, 0x10
jmp 0x40e1c3
mov edx, dword [0x42cda0]
push edx
push str._s_NoModuleName_except.log
lea eax, [ebp - 0x104]
push eax
call fcn.00410dfc
add esp, 0xc
mov byte [ebp - 1], 0
push 0
push 0x80000000
push 4
push 0
push 0
push 0x40000000
lea ecx, [ebp - 0x104]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x21c], eax
cmp dword [ebp - 0x21c], 0
je 0x40e3aa
push 2
push 0
push 0
mov edx, dword [ebp - 0x21c]
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
mov eax, dword [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x218], eax
cmp dword [ebp - 0x218], 0x400000
jb 0x40e36c
lea ecx, [ebp - 0x228]
push ecx
call fcn.00402c9d
add esp, 4
mov edx, dword [ebp - 0x21c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str..log
lea eax, [ebp - 0x104]
push eax
call fcn.00411050
add esp, 8
mov dword [ebp - 0x214], eax
cmp dword [ebp - 0x214], 0
je 0x40e286
mov ecx, dword [ebp - 0x214]
lea edx, [ebp - 0x104]
sub ecx, edx
mov byte [ebp - 0x108], cl
jmp 0x40e29b
lea eax, [ebp - 0x104]
push eax
call fcn.00412190
add esp, 4
mov byte [ebp - 0x108], al
push 0xff
push 0
lea ecx, [ebp - 0x43c]
push ecx
call fcn.00410e60
add esp, 0xc
mov edx, dword [ebp - 0x108]
and edx, 0xff
push edx
lea eax, [ebp - 0x104]
push eax
lea ecx, [ebp - 0x43c]
push ecx
call fcn.00411580
add esp, 0xc
mov edx, dword [ebp - 0x226]
and edx, 0xff
push edx
mov eax, dword [ebp - 0x225]
and eax, 0xff
push eax
mov ecx, dword [ebp - 0x224]
and ecx, 0xff
push ecx
mov edx, dword [ebp - 0x223]
and edx, 0xffff
push edx
lea eax, [ebp - 0x43c]
push eax
push str._s_d_02d_02d_02d.log
lea ecx, [ebp - 0x338]
push ecx
call fcn.00410dfc
add esp, 0x1c
lea edx, [ebp - 0x338]
push edx
call fcn.004111b8
add esp, 4
lea eax, [ebp - 0x338]
push eax
lea ecx, [ebp - 0x104]
push ecx
call fcn.0041118a
add esp, 8
push 0
push 0x80000000
push 4
push 0
push 0
push 0x40000000
lea edx, [ebp - 0x104]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x21c], eax
cmp dword [ebp - 0x21c], 0
je 0x40e3aa
push 0
lea eax, [ebp - 0x22c]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x21c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x21c], 0
mov esp, ebp
pop ebp
ret