Function at 0x40b5d0
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 [0x4111b8]
test eax, eax
jne 0x40b642
mov eax, dword fs:[0x18]
mov dword [ebp - 0xdc], eax
mov eax, dword [ebp - 0xdc]
mov ebx, dword [eax + 0x34]
push 0x40e21c
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
push str.__wine_dbg_get_channel_flags
push eax
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov ecx, sym._fallback__wine_dbg_get_channel_flags
test eax, eax
je 0x40b622
mov ecx, eax
xchg dword [0x4111b8], ecx
mov eax, dword fs:[0x18]
mov dword [ebp - 0xdc], eax
mov eax, dword [ebp - 0xdc]
mov dword [eax + 0x34], ebx
mov eax, dword [0x4111b8]
push esi
call eax
add esp, 4
movzx eax, al
bt eax, edi
jae 0x40b84b
mov ecx, dword [0x411244]
mov eax, dword fs:[0x18]
mov dword [ebp - 0xdc], eax
mov edx, dword [ebp - 0xdc]
xor eax, eax
cmp ecx, dword [edx + 0x24]
je 0x40b850
lea ebx, [ebp - 0xdc]
test byte [0x410255], 8
je 0x40b72b
mov eax, dword [0x4111b8]
test eax, eax
jne 0x40b6e4
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 0x40e21c
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
push str.__wine_dbg_get_channel_flags
push eax
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov ecx, sym._fallback__wine_dbg_get_channel_flags
test eax, eax
je 0x40b6c7
mov ecx, eax
xchg dword [0x4111b8], 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 [0x4111b8]
push 0x410255
call eax
add esp, 4
test al, 8
je 0x40b72b
call dword [sym.imp.kernel32.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 [0x410265], 8
je 0x40b7bf
mov eax, dword [0x4111b8]
test eax, eax
jne 0x40b792
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 0x40e21c
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
push str.__wine_dbg_get_channel_flags
push eax
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov ecx, sym._fallback__wine_dbg_get_channel_flags
test eax, eax
je 0x40b775
mov ecx, eax
xchg dword [0x4111b8], 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 [0x4111b8]
push 0x410265
call eax
add esp, 4
test al, 8
je 0x40b7bf
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 0x40b81e
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x40b81e
add ebx, eax
inc esi
mov eax, dword [edi*4 + 0x40e1b8]
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 0x40b850
mov eax, 0xffffffff
add esp, 0xd0
pop esi
pop edi
pop ebx
pop ebp
ret