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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d40c1
mov eax, dword fs:[0]
push eax
mov eax, 0x424c
call fcn.004848f0
mov eax, dword [0x56b06c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
push dword [edi + 0x1c]
lea esi, [edi + 0x1c]
mov dword [ebp - 0x4258], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 0
mov eax, dword [edi + 4]
cmp eax, 0xffffffff
je 0x41d635
cmp dword [edi + 0x14], 0
je 0x41d304
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp dword [edi + 0x14], eax
jae 0x41d304
mov ecx, edi
call fcn.0041c920
push 2
push 0
push 0
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0x4238]
xorps xmm0, xmm0
push eax
movups xmmword [ebp - 0x4238], xmm0
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push 0x200
lea eax, [ebp - 0x210]
push 0
push eax
call fcn.004a9e70
movzx eax, word [ebp - 0x422a]
push eax
movzx eax, word [ebp - 0x422c]
push eax
movzx eax, word [ebp - 0x422e]
push eax
movzx eax, word [ebp - 0x4230]
push eax
movzx eax, word [ebp - 0x4232]
push eax
movzx eax, word [ebp - 0x4236]
push eax
movzx eax, word [ebp - 0x4238]
push eax
push str._04d__02d__02d__02d:_02d:_02d._03d
lea eax, [ebp - 0x210]
push 0x200
push eax
call fcn.0041d860
add esp, 0x34
test eax, eax
js 0x41d3e6
mov ecx, 0x200
lea eax, [ebp - 0x210]
nop dword [eax]
cmp byte [eax], 0
je 0x41d3ab
inc eax
sub ecx, 1
jne 0x41d3a0
mov eax, 0x200
mov edx, ecx
sub eax, ecx
neg edx
sbb edx, edx
and edx, eax
test ecx, ecx
je 0x41d3e6
test edx, edx
je 0x41d3e6
push 0
lea eax, [ebp - 0x4254]
mov dword [ebp - 0x4254], 0
push eax
push edx
lea eax, [ebp - 0x210]
push eax
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x4000
lea eax, [ebp - 0x4210]
push 0
push eax
call fcn.004a9e70
add esp, 0xc
lea eax, [ebp + 0x10]
push eax
push 0
push dword [ebp + 0xc]
lea eax, [ebp - 0x4210]
push 0x1fff
push eax
call fcn.004092d0
mov ecx, dword [eax]
push dword [eax + 4]
or ecx, 1
push ecx
call fcn.004b4777
or ecx, 0xffffffff
add esp, 0x1c
test eax, eax
cmovs eax, ecx
test eax, eax
js 0x41d5a1
cmp eax, 0x1fff
ja 0x41d5a1
jne 0x41d44d
xor eax, eax
mov word [ebp - 0x212], ax
xor eax, eax
mov dword [ebp - 0x4218], 0
lea ecx, [ebp - 0x4210]
mov dword [ebp - 0x4214], 7
mov word [ebp - 0x4228], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x41d473
sub ecx, edx
lea eax, [ebp - 0x4210]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x4228]
call fcn.00412c70
lea eax, [ebp - 0x4228]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0x4250]
push eax
call fcn.004a8270
add esp, 8
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x4214]
cmp edx, 8
jb 0x41d4f3
mov ecx, dword [ebp - 0x4228]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x41d4e9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41d658
push edx
push ecx
call fcn.004835cc
add esp, 8
xor eax, eax
mov dword [ebp - 0x4218], 0
push 0x53f280
lea ecx, [ebp - 0x4250]
mov dword [ebp - 0x4214], 7
mov word [ebp - 0x4228], ax
call fcn.0040a990
mov edx, dword [ebp - 0x423c]
lea eax, [ebp - 0x4250]
mov ecx, dword [ebp - 0x4250]
cmp edx, 0x10
cmovae eax, ecx
cmp dword [ebp - 0x4240], 0
je 0x41d570
push 0
lea ecx, [ebp - 0x4254]
mov dword [ebp - 0x4254], 0
push ecx
push dword [ebp - 0x4240]
push eax
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp - 0x423c]
mov ecx, dword [ebp - 0x4250]
cmp edx, 0x10
jb 0x41d635
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x41d62b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41d65d
jmp 0x41d62b
xor eax, eax
mov dword [ebp - 0x4214], 0xf
push 0x24
push str.Cant_write_to_log._Too_big_string._n
lea ecx, [ebp - 0x4228]
mov word [ebp - 0x212], ax
mov dword [ebp - 0x4218], eax
mov byte [ebp - 0x4228], al
call fcn.00409010
mov edx, dword [ebp - 0x4214]
lea eax, [ebp - 0x4228]
mov ecx, dword [ebp - 0x4228]
cmp edx, 0x10
cmovae eax, ecx
cmp dword [ebp - 0x4218], 0
je 0x41d570
push 0
lea ecx, [ebp - 0x4254]
mov dword [ebp - 0x4254], 0
push ecx
push dword [ebp - 0x4218]
push eax
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp - 0x4214]
mov ecx, dword [ebp - 0x4228]
jmp 0x41d570
push edx
push ecx
call fcn.004835cc
add esp, 8
push dword [esi]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0048358b
mov esp, ebp
pop ebp
ret
call fcn.004b1db8
call fcn.004b1db8
int3