Function at 0x401c40
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0xd0
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov eax, dword [0x404040]
test eax, eax
jne 0x401cb2
mov eax, dword fs:[0x18]
mov dword [ebp - 0xdc], eax
mov eax, dword [ebp - 0xdc]
mov ebx, dword [eax + 0x34]
push 0x403184
call dword [sym.imp.kernelbase.dll_GetModuleHandleW]
push str.__wine_dbg_get_channel_flags
push eax
call dword [sym.imp.kernelbase.dll_GetProcAddress]
mov ecx, sym._fallback__wine_dbg_get_channel_flags
test eax, eax
je 0x401c92
mov ecx, eax
xchg dword [0x404040], ecx
mov eax, dword fs:[0x18]
mov dword [ebp - 0xdc], eax
mov eax, dword [ebp - 0xdc]
mov dword [eax + 0x34], ebx
mov eax, dword [0x404040]
push esi
call eax
add esp, 4
movzx eax, al
bt eax, edi
jae 0x401ebb
mov ecx, dword [0x4040cc]
mov eax, dword fs:[0x18]
mov dword [ebp - 0xdc], eax
mov edx, dword [ebp - 0xdc]
xor eax, eax
cmp ecx, dword [edx + 0x24]
je 0x401ec0
lea ebx, [ebp - 0xdc]
test byte [0x404015], 8
je 0x401d9b
mov eax, dword [0x404040]
test eax, eax
jne 0x401d54
mov eax, dword fs:[0x18]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x34]
mov dword [ebp - 0x14], eax
push 0x403184
call dword [sym.imp.kernelbase.dll_GetModuleHandleW]
push str.__wine_dbg_get_channel_flags
push eax
call dword [sym.imp.kernelbase.dll_GetProcAddress]
mov ecx, sym._fallback__wine_dbg_get_channel_flags
test eax, eax
je 0x401d37
mov ecx, eax
xchg dword [0x404040], ecx
mov eax, dword fs:[0x18]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
mov dword [eax + 0x34], ecx
mov eax, dword [0x404040]
push 0x404015
call eax
add esp, 4
test al, 8
je 0x401d9b
call dword [sym.imp.kernelbase.dll_GetTickCount]
mov ecx, eax
mov edx, 0x10624dd3
mul edx
shr edx, 6
imul eax, edx, 0x3e8
sub ecx, eax
lea eax, [ebp - 0xdc]
push ecx
push edx
push str._3u._03u:
push eax
call sym._sprintf
add esp, 0x10
lea ebx, [eax + ebp]
add ebx, 0xffffff24
test byte [0x404025], 8
je 0x401e2f
mov eax, dword [0x404040]
test eax, eax
jne 0x401e02
mov eax, dword fs:[0x18]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x34]
mov dword [ebp - 0x14], eax
push 0x403184
call dword [sym.imp.kernelbase.dll_GetModuleHandleW]
push str.__wine_dbg_get_channel_flags
push eax
call dword [sym.imp.kernelbase.dll_GetProcAddress]
mov ecx, sym._fallback__wine_dbg_get_channel_flags
test eax, eax
je 0x401de5
mov ecx, eax
xchg dword [0x404040], ecx
mov eax, dword fs:[0x18]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
mov dword [eax + 0x34], ecx
mov eax, dword [0x404040]
push 0x404025
call eax
add esp, 4
test al, 8
je 0x401e2f
mov eax, dword fs:[0x18]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
push dword [eax + 0x20]
push str._04x:
push ebx
call sym._sprintf
add esp, 0xc
add ebx, eax
mov eax, dword fs:[0x18]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
push dword [eax + 0x24]
push str._04x:
push ebx
call sym._sprintf
add esp, 0xc
cmp edi, 3
ja 0x401e8e
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x401e8e
add ebx, eax
inc esi
mov eax, dword [edi*4 + 0x403120]
lea edx, [ebp - 0xdc]
sub edx, ebx
add edx, 0xc8
sub esp, 0x18
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], eax
mov dword [esp], ebx
mov dword [esp + 4], edx
call sym._snprintf
add esp, 0x18
push 2
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
add esp, 4
mov esi, eax
lea edi, [ebp - 0xdc]
push edi
call dword [sym.imp.ucrtbase.dll_strlen]
add esp, 4
push esi
push eax
push 1
push edi
call dword [sym.imp.ucrtbase.dll_fwrite]
add esp, 0x10
jmp 0x401ec0
mov eax, 0xffffffff
add esp, 0xd0
pop esi
pop edi
pop ebx
pop ebp
ret