Function at 0x404600
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40c378
push 0x4056a0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
mov eax, 0x3048
call fcn.00405280
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x201c], ebx
lea eax, [ebp - 0x3060]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov dword [ebp - 4], ebx
mov esi, dword [ebp + 8]
lea ecx, [esi + 0x824]
push ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp byte [esi + 0x808], bl
jne 0x40467d
push 6
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0x154
mov edx, dword [0x40f780]
push edx
mov ecx, esi
call fcn.00404bc0
jmp 0x4048a7
mov eax, dword [ebp - 0x305c]
cmp eax, dword [esi + 0x820]
jb 0x4046c9
ja 0x40469b
mov ecx, dword [ebp - 0x3060]
cmp ecx, dword [esi + 0x81c]
jb 0x4046c9
mov ecx, esi
call fcn.00404560
push ebx
lea edx, [esi + 4]
push edx
mov ecx, esi
call fcn.00403f40
test eax, eax
jne 0x4046c9
push 0x15e
mov eax, dword [0x40f780]
push eax
mov ecx, esi
call fcn.00404bc0
jmp 0x4048a7
mov ecx, dword [ebp + 0xc]
cmp ecx, dword [esi + 0x80c]
ja 0x404896
mov word [ebp - 0x1a], bx
mov word [ebp - 0x2018], bx
lea edx, [ebp - 0x204c]
push edx
lea eax, [ebp - 0x3060]
push eax
call fcn.00404b20
add esp, 8
push eax
push str._s:
push 0xfff
lea ecx, [ebp - 0x2018]
push ecx
call fcn.004051ce
add esp, 0x10
mov dword [ebp - 0x3058], eax
push ebx
push ebx
push 0xfff
lea edx, [ebp - 0x304c]
push edx
push 0xffffffffffffffff
lea eax, [ebp - 0x2018]
push eax
push 0x200
push ebx
mov edi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
call edi
dec eax
mov dword [ebp - 0x3058], eax
mov byte [ebp - 0x204d], bl
push ebx
lea ecx, [ebp - 0x3058]
push ecx
push eax
lea edx, [ebp - 0x304c]
push edx
mov eax, dword [esi + 0x804]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x404784
push 0x170
mov ecx, dword [0x40f780]
push ecx
mov ecx, esi
call fcn.00404bc0
jmp 0x4048a7
lea edx, [ebp + 0x14]
mov dword [ebp - 0x3050], edx
lea eax, [ebp + 0x14]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
push 0xfff
lea edx, [ebp - 0x2018]
push edx
call fcn.004057b4
add esp, 0x10
mov dword [ebp - 0x3058], eax
mov dword [ebp - 0x3050], ebx
cmp eax, 0xffffffff
jne 0x4047c4
mov dword [ebp - 0x3058], 0xfff
push ebx
push ebx
push 0xfff
lea eax, [ebp - 0x304c]
push eax
push 0xffffffffffffffff
lea ecx, [ebp - 0x2018]
push ecx
push 0x200
push ebx
call edi
dec eax
mov dword [ebp - 0x3058], eax
mov byte [ebp - 0x204d], bl
cmp dword [esi + 0x83c], ebx
je 0x404814
xor ecx, ecx
mov dword [ebp - 0x3054], ecx
cmp ecx, eax
jae 0x404814
mov dl, byte [esi + 0x83c]
xor byte [ebp + ecx - 0x304c], dl
inc ecx
jmp 0x4047fa
push ebx
lea ecx, [ebp - 0x3058]
push ecx
push eax
lea edx, [ebp - 0x304c]
push edx
mov eax, dword [esi + 0x804]
push eax
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
call edi
test eax, eax
jne 0x40484c
push 0x192
mov ecx, dword [0x40f780]
push ecx
mov ecx, esi
call fcn.00404bc0
jmp 0x4048a7
push ebx
lea edx, [ebp - 0x3058]
push edx
mov eax, dword [0x40c338]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
mov ecx, dword [0x40c338]
push ecx
mov edx, dword [esi + 0x804]
push edx
call edi
test eax, eax
jne 0x404889
push 0x199
mov eax, dword [0x40f780]
push eax
mov ecx, esi
call fcn.00404bc0
jmp 0x4048a7
mov ecx, dword [esi + 0x804]
push ecx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov dword [ebp - 0x201c], 1
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [ebp - 4], 0xffffffff
call fcn.004048cd
mov eax, dword [ebp - 0x201c]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret