Function at 0x4010c0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0xa14
cmp dword [0x433098], 0
je 0x4014b8
cmp dword [0x4332a8], 0
jne 0x4010e7
push 0x4332a8
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov ecx, dword [esp + 0xa18]
push ebx
lea ebx, [esp + 0xa24]
push ebp
push esi
push edi
test ecx, ecx
je 0x40112c
cmp ecx, 0x10000
ja 0x40112c
mov edi, dword [esp + 0xa2c]
test edi, edi
je 0x401123
mov esi, dword [esp + 0xa30]
lea ebx, [esp + 0xa34]
jmp 0x4011b6
mov esi, dword [esp + 0x18]
jmp 0x4011b6
mov eax, dword [esp + 0xa2c]
mov byte [esp + 0x1c], 0
test ecx, ecx
je 0x40116e
test eax, eax
je 0x4011b2
cmp byte [eax], 0
je 0x40116e
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
lea eax, [esp + 0x28]
push str._08X__06X__s___
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, dword [esp + 0xa40]
add esp, 0x14
test eax, eax
je 0x4011b2
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
push eax
lea eax, [esp + 0x20]
push eax
call esi
push 0x4161d4
lea eax, [esp + 0x20]
push eax
call esi
lea eax, [esp + 0xa30]
push eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x528]
push eax
call dword [sym.imp.USER32.dll_wvsprintfA]
mov esi, eax
lea edi, [esp + 0x520]
jmp 0x4011b6
xor esi, esi
xor edi, edi
push 0x4332a8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x433098]
mov ebp, dword [sym.imp.KERNEL32.dll_GetStdHandle]
test al, 2
je 0x4011f0
cmp dword [0x418008], 0xffffffff
jne 0x4011f0
push 0xfffffffffffffff5
call ebp
push 6
push eax
mov dword [0x418008], eax
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
mov eax, dword [0x433098]
test al, 4
je 0x40120b
cmp dword [0x41800c], 0xffffffff
jne 0x40120b
push 0xfffffffffffffff4
call ebp
mov dword [0x41800c], eax
mov eax, dword [0x433098]
test al, 1
je 0x401272
cmp word [0x4330a0], 0
je 0x401272
cmp dword [0x418004], 0xffffffff
jne 0x401272
test al, 0x10
mov eax, 0
push 0
setne al
push 0x8000080
lea eax, [eax*2 + 2]
push eax
push 0
push 3
push 0x40000000
push 0x4330a0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, eax
mov eax, dword [0x433098]
mov dword [0x418004], ecx
test al, 0x10
je 0x401272
push 2
push 0
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [0x433098]
test esi, esi
jle 0x4012f0
test al, 8
je 0x40128a
push esi
push edi
call dword [section..data]
mov eax, dword [0x433098]
add esp, 8
mov ebx, dword [sym.imp.KERNEL32.dll_WriteConsoleA]
test al, 2
je 0x4012aa
push 0
lea eax, [esp + 0x14]
push eax
push esi
push edi
push dword [0x418008]
call ebx
mov eax, dword [0x433098]
test al, 4
je 0x4012c4
push 0
lea eax, [esp + 0x14]
push eax
push esi
push edi
push dword [0x41800c]
call ebx
mov eax, dword [0x433098]
test al, 1
je 0x4014a9
mov ecx, dword [0x418004]
cmp ecx, 0xffffffff
je 0x4014a9
push 0
lea eax, [esp + 0x14]
push eax
push esi
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x4014a9
cmp dword [esp + 0xa2c], 0
jne 0x4014a9
mov ebp, dword [ebx]
xor esi, esi
mov ecx, dword [ebx + 4]
mov ebx, dword [sym.imp.KERNEL32.dll_WriteConsoleA]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], esi
test ebp, ebp
je 0x401432
xor edi, edi
cmp esi, 0x200
jae 0x4013a0
mov eax, dword [esp + 0x14]
nop
test ebp, ebp
je 0x40138d
mov bl, byte [eax + ecx]
mov cl, bl
shr bl, 4
and cl, 0xf
cmp cl, 0xa
movzx ecx, cl
sbb edx, edx
and edx, 0xfffffff9
add edx, 0x37
add dx, cx
mov ecx, 0x100
movzx esi, dx
imul esi, ecx
cmp bl, 0xa
movzx ecx, bl
sbb edx, edx
inc eax
and edx, 0xfffffff9
dec ebp
add edx, 0x37
add dx, cx
or si, dx
movzx ecx, si
mov byte [esp + edi + 0x1c], cl
shr ecx, 8
mov byte [esp + edi + 0x1d], cl
add edi, 2
mov ecx, dword [esp + 0x18]
cmp eax, 0x200
jb 0x401330
mov ebx, dword [sym.imp.KERNEL32.dll_WriteConsoleA]
mov dword [esp + 0x14], eax
mov eax, dword [0x433098]
mov esi, dword [esp + 0x14]
test al, 8
je 0x4013b8
lea eax, [esp + 0x1c]
push edi
push eax
call dword [section..data]
mov eax, dword [0x433098]
add esp, 8
test al, 2
je 0x4013d6
push 0
lea eax, [esp + 0x14]
push eax
push edi
lea eax, [esp + 0x28]
push eax
push dword [0x418008]
call ebx
mov eax, dword [0x433098]
test al, 4
je 0x4013f4
push 0
lea eax, [esp + 0x14]
push eax
push edi
lea eax, [esp + 0x28]
push eax
push dword [0x41800c]
call ebx
mov eax, dword [0x433098]
test al, 1
je 0x401420
mov ecx, dword [0x418004]
cmp ecx, 0xffffffff
je 0x401420
push 0
lea eax, [esp + 0x14]
push eax
push edi
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [esp + 0x28]
push eax
push ecx
call edi
mov eax, dword [0x433098]
jmp 0x401426
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esp + 0x18]
test ebp, ebp
jne 0x401321
test al, 8
je 0x40144b
push 2
push 0x4161d4
call dword [section..data]
mov eax, dword [0x433098]
add esp, 8
test al, 2
je 0x40146a
push 0
lea eax, [esp + 0x14]
push eax
push 2
push 0x4161d4
push dword [0x418008]
call ebx
mov eax, dword [0x433098]
test al, 4
je 0x401489
push 0
lea eax, [esp + 0x14]
push eax
push 2
push 0x4161d4
push dword [0x41800c]
call ebx
mov eax, dword [0x433098]
test al, 1
je 0x4014a9
mov ecx, dword [0x418004]
cmp ecx, 0xffffffff
je 0x4014a9
push 0
lea eax, [esp + 0x14]
push eax
push 2
push 0x4161d4
push ecx
call edi
push 0x4332a8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa14
ret