Function at 0x4034c0
Capabilities:
Get file size
Print debug messages
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x42b4e6
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x4530
call fcn.00429430
mov eax, dword [0x4340a0]
xor eax, esp
mov dword [esp + 0x452c], eax
push ebx
push edi
mov eax, dword [0x4340a0]
xor eax, esp
push eax
lea eax, [esp + 0x4540]
mov dword fs:[0], eax
xor ebx, ebx
cmp dword [ebp + 8], ebx
jne 0x403512
xor eax, eax
jmp 0x40380b
cmp dword [esi + 0x2c], ebx
je 0x40350b
push 0x7f
lea eax, [esp + 0x39]
push ebx
push eax
mov byte [esp + 0x40], bl
call fcn.0041e500
add esp, 0xc
push 0x7f
lea ecx, [esp + 0xb9]
push ebx
push ecx
mov byte [esp + 0xc0], bl
call fcn.0041e500
mov edx, dword [0x435210]
mov eax, dword [edx + 0xc]
add esp, 0xc
mov ecx, 0x435210
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
lea ecx, [ebp + 0xc]
mov dword [esp + 0x4548], ebx
mov ebx, dword [ebp + 8]
push ecx
lea edi, [esp + 0x20]
call fcn.00403830
lea edx, [esp + 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx eax, word [esp + 0x2a]
movzx ecx, word [esp + 0x26]
movzx edx, word [esp + 0x24]
push eax
push ecx
push edx
lea eax, [esp + 0xc0]
push str._04d__02d__02d
push eax
call fcn.0041c7b6
movzx ecx, word [esp + 0x44]
movzx edx, word [esp + 0x42]
movzx eax, word [esp + 0x40]
add esp, 0x14
push ecx
push edx
push eax
lea ecx, [esp + 0x40]
push str._02d:_02d:_02d
push ecx
call fcn.0041c7b6
lea eax, [esi + 0x10]
add esp, 0x14
push eax
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi]
xor ebx, ebx
cmp eax, ebx
je 0x4036f7
cmp dword [esi + 0x38], ebx
je 0x403634
lea edx, [esp + 0x14]
push edx
push eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov edx, dword [esp + 0x18]
mov ecx, dword [esi + 0x38]
xor eax, eax
cmp edx, eax
jl 0x403634
jg 0x403613
mov eax, dword [esp + 0x14]
cmp eax, ecx
jbe 0x403634
mov edx, dword [esi]
push ebx
lea ecx, [esp + 0x1c]
push ecx
push ebx
push edx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
cmp dword [esi + 0xc], ebx
mov dword [esp + 0x10], ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
je 0x40368e
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0xb8]
push edx
lea eax, [esp + 0x13c]
push 0x42def0
push eax
call fcn.0041c7b6
lea eax, [esp + 0x144]
add esp, 0x10
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403670
push 0
sub eax, edx
lea ecx, [esp + 0x14]
push ecx
push eax
mov eax, dword [esi]
lea edx, [esp + 0x140]
push edx
push eax
call ebx
mov edi, dword [esp + 0x1c]
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403697
push 0
lea ecx, [esp + 0x14]
push ecx
sub eax, edx
mov edx, dword [esi]
push eax
push edi
push edx
call ebx
cmp dword [esi + 0x30], 0
je 0x4036c7
mov ecx, dword [esi]
push 0
lea eax, [esp + 0x14]
push eax
push 2
push 0x42decc
push ecx
call ebx
cmp dword [esi + 8], 0
je 0x4036d6
mov edx, dword [esi]
push edx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
xor ebx, ebx
cmp dword [esi + 4], ebx
je 0x40370a
push edi
cmp dword [esi + 0xc], ebx
je 0x4036fd
lea eax, [esp + 0x38]
push eax
push str._s__s_n
call fcn.0041cb5f
add esp, 0xc
jmp 0x40370a
mov edi, dword [esp + 0x1c]
jmp 0x4036d8
push 0x42df00
call fcn.0041cb5f
add esp, 8
cmp dword [esi + 0x34], ebx
je 0x403721
push edi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 0x42df04
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
cmp dword [esi + 0x3c], ebx
je 0x4037d4
cmp dword [esi + 0x44], ebx
je 0x4037d4
push edi
cmp dword [esi + 0xc], ebx
je 0x403755
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x53c]
push str._s__s
push edx
call fcn.0041c7b6
add esp, 0x10
jmp 0x40376a
lea eax, [esp + 0x538]
push 0x42df10
push eax
call fcn.0041c7b6
add esp, 0xc
lea eax, [esi + 0x54]
push eax
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x538]
call fcn.00401cb0
lea edi, [esi + 0x6c]
lea ebx, [esp + 0x10]
mov byte [esp + 0x4548], 1
call fcn.00403fa0
mov byte [esp + 0x4548], 0
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4037c5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edi, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea eax, [edi - 0x10]
mov dword [esp + 0x4548], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403806
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x4540]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov ecx, dword [esp + 0x452c]
xor ecx, esp
call fcn.0041c257
mov esp, ebp
pop ebp
ret