Function at 0x420542
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x64]
sub esp, 0xb8
push esi
push edi
push 0x79
xor edi, edi
push edi
lea eax, [ebp - 0x38]
push eax
call fcn.0041e8b4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x37], eax
mov al, byte [ebp + 0x78]
mov byte [ebp - 0x38], al
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebp - 0x33], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebp - 0x2f], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x2b], eax
mov eax, dword [ebp + 0x74]
mov dword [ebp + 0x3d], eax
lea eax, [ebp + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
cmp dword [ebp + 0x6c], edi
je 0x4205a6
mov ecx, dword [ebp + 0x6c]
call fcn.0041f33e
jmp 0x4205a8
xor eax, eax
push 0x32
pop esi
cmp eax, edi
jbe 0x4205c3
mov ecx, dword [ebp + 0x6c]
inc eax
cmp eax, esi
mov dword [ebp + 0x60], eax
lea edx, [ebp - 0x27]
cmova eax, esi
call fcn.0041ec48
cmp dword [ebp + 0x70], edi
je 0x4205d5
mov ecx, dword [ebp + 0x70]
call fcn.0041f33e
mov dword [ebp + 0x60], eax
jmp 0x4205d8
mov dword [ebp + 0x60], edi
cmp dword [ebp + 0x60], edi
jbe 0x4205f4
inc dword [ebp + 0x60]
cmp dword [ebp + 0x60], esi
mov ecx, dword [ebp + 0x70]
mov eax, esi
cmovbe eax, dword [ebp + 0x60]
lea edx, [ebp + 0xb]
call fcn.0041ec48
push ebx
mov eax, 0x1000
mov byte [ebp + 0x6f], 0
call fcn.0041e7d1
push 0x1b
mov ebx, eax
push 0x409370
lea eax, [ebp - 0x54]
push eax
call fcn.0041e83d
push 0x1a
mov dword [ebp + 0x54], eax
pop eax
mov dword [ebp + 0x58], eax
mov dword [ebp + 0x5c], eax
cmp ebx, edi
je 0x4206bf
cmp byte [ebp + 0x78], 3
jae 0x42063c
movzx eax, byte [ebp + 0x78]
mov eax, dword [eax*4 + 0x409364]
jmp 0x420641
mov eax, 0x406694
push eax
push dword [ebp + 0x3d]
lea eax, [ebp + 0xb]
push eax
lea eax, [ebp - 0x27]
push eax
push dword [ebp - 0x37]
movzx eax, word [ebp + 0x50]
push dword [ebp - 0x37]
mov edx, 0xfa
push dword [ebp - 0x2f]
mov edi, ebx
push dword [ebp - 0x2f]
push dword [ebp - 0x33]
push dword [ebp - 0x33]
push dword [ebp - 0x2b]
push eax
movzx eax, word [ebp + 0x4e]
push eax
movzx eax, word [ebp + 0x4c]
push eax
push 0x409390
call fcn.0041f4f4
mov esi, eax
add esp, 0x3c
test esi, esi
jle 0x4206b7
lea eax, [ebp + 0x80]
push eax
push dword [ebp + 0x7c]
mov edx, 0x800
sub edx, esi
lea edi, [ebx + esi*2]
call fcn.0041f53a
test eax, eax
jle 0x4206b7
add eax, esi
lea esi, [ebp + 0x54]
mov ecx, ebx
call fcn.0041f666
mov byte [ebp + 0x6f], al
push ebx
call fcn.0041e801
xor edi, edi
movzx eax, byte [0x42a433]
neg eax
push 0x409458
sbb eax, eax
and eax, 0x42c168
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
cmp eax, edi
je 0x4206ec
mov esi, eax
call fcn.00422387
mov dword [ebp + 0x78], eax
jmp 0x4206ef
mov dword [ebp + 0x78], edi
cmp dword [ebp + 0x78], edi
je 0x420742
call fcn.004203e3
mov ebx, eax
cmp ebx, 0xffffffff
je 0x42073a
push 2
push edi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x420733
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
lea eax, [ebp + 0x60]
push eax
push dword [ebp + 0x5c]
push dword [ebp + 0x54]
push ebx
call esi
push edi
lea eax, [ebp + 0x60]
push eax
push 4
push 0x401aa8
push ebx
call esi
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp + 0x78]
call fcn.0042240e
cmp byte [ebp + 0x6f], 0
pop ebx
je 0x420751
lea esi, [ebp + 0x54]
call fcn.0041f654
push dword [ebp - 0x37]
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
add ebp, 0x64
leave
ret