Function at 0x405b30
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xac
mov eax, dword [0x45d074]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov esi, edx
push edi
lea edx, [ebp - 0x84]
mov dword [ebp - 0x90], eax
push edx
lea edi, [ebp - 0x98]
lea ebx, [ebp - 0xac]
mov eax, esi
mov dword [ebp - 0xa0], esi
mov dword [ebp - 0x9c], ecx
mov byte [ebp - 0x7d], 0
call fcn.004057d0
mov bl, byte [ebp - 0xac]
mov eax, dword [0x45c2bc]
add esp, 4
test bl, bl
je 0x405b99
cmp dword [ebp - 0xa8], eax
jl 0x4061ba
cmp byte [0x46d758], 0
je 0x405bb1
mov ecx, dword [ebp - 0x98]
cmp dword [ecx + 4], eax
jl 0x4061ba
mov eax, dword [ebp + 0xc]
test al, 1
je 0x405bc2
push eax
push esi
call fcn.00405850
add esp, 8
mov eax, 0x20202020
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xa4]
add eax, eax
cmp eax, 0x1f
jbe 0x405bf9
mov esi, 0x1f
mov dword [ebp - 0x94], esi
jmp 0x405c01
mov esi, eax
mov dword [ebp - 0x94], eax
mov byte [ebp + esi - 0x24], 0
mov edi, 0x468df0
test bl, bl
je 0x405c7a
mov eax, 0x20202020
mov word [ebp - 0x88], ax
mov byte [ebp - 0x86], al
mov byte [ebp - 0x88], bl
cmp bl, byte [0x46d788]
je 0x405c4d
cmp byte [0x45c2b1], 0
jne 0x405c56
mov byte [0x468df0], 0xa
mov edi, 0x468df1
mov byte [0x45c2b1], 1
jmp 0x405c56
cmp byte [0x45c2b1], 0
je 0x405c7a
mov dx, word [ebp - 0x88]
mov word [edi], dx
mov byte [edi + 2], al
lea eax, [ebp - 0x24]
push eax
add edi, 3
push 0x1ffd
push edi
call fcn.00407260
add esp, 0xc
add edi, esi
mov eax, dword [ebp + 0xc]
and eax, 2
mov dword [ebp - 0x8c], eax
je 0x405c91
mov eax, edi
call fcn.004053f0
add edi, eax
mov ecx, dword [ebp + 8]
mov edx, 0x46adef
mov eax, ecx
sub edx, edi
dec eax
je 0x405d82
dec eax
je 0x405cd0
cmp dword [0x46d75c], 0
mov esi, dword [ebp - 0x84]
push 0xb43
push str.dptrace.c
push ecx
push str._ERROR___Illegal_encoding__d__for_Trace___s__d__n
je 0x405d3b
call fcn.004053c0
add esp, 0x10
jmp 0x405d45
mov eax, dword [ebp - 0x9c]
lea ecx, [ebp - 0x90]
push ecx
mov ecx, dword [ebp - 0x90]
mov esi, edi
call fcn.00405770
add esp, 4
cmp eax, 0xffffffff
jne 0x405d6d
cmp dword [0x46d75c], 0
mov esi, dword [ebp - 0x84]
je 0x405d23
call dword [sym.imp.MSVCR100.dll__errno]
mov edx, dword [eax]
push 0xb19
push str.dptrace.c
push edx
push str._ERROR___vsnprintfU_err__errno_d___s__d__n
call fcn.004053c0
add esp, 0x10
jmp 0x405d45
call dword [sym.imp.MSVCR100.dll__errno]
mov eax, dword [eax]
push 0xb19
push str.dptrace.c
push eax
push str._ERROR___vsnprintfU_err__errno_d___s__d__n
push esi
call dword [sym.imp.MSVCR100.dll_fprintf]
add esp, 0x14
cmp dword [0x46d75c], 0
jne 0x4061ba
push esi
call dword [sym.imp.MSVCR100.dll_fflush]
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040981a
mov esp, ebp
pop ebp
ret
cmp eax, 0xfffffffe
jne 0x405d76
mov byte [ebp - 0x7d], 1
mov byte [0x46adef], 0
jmp 0x405e16
mov eax, dword [ebp - 0x9c]
lea ecx, [ebp - 0x90]
push ecx
mov ecx, dword [ebp - 0x90]
mov esi, 0x45d1a0
call fcn.00405770
add esp, 4
cmp eax, 0xffffffff
jne 0x405df8
cmp dword [0x46d75c], 0
mov esi, dword [ebp - 0x84]
je 0x405ddb
call dword [sym.imp.MSVCR100.dll__errno]
mov edx, dword [eax]
push 0xb2f
push str.dptrace.c
push edx
push str._ERROR___vsnprintf_err__errno_d___s__d__n
call fcn.004053c0
add esp, 0x10
jmp 0x405d45
call dword [sym.imp.MSVCR100.dll__errno]
mov eax, dword [eax]
push 0xb2f
push str.dptrace.c
push eax
push str._ERROR___vsnprintf_err__errno_d___s__d__n
jmp 0x405d3b
cmp eax, 0xfffffffe
jne 0x405e01
mov byte [ebp - 0x7d], 1
push 0x45d1a0
push edi
mov byte [0x45f19f], 0
call fcn.00407390
add esp, 8
mov ebx, dword [ebp - 0x90]
mov esi, dword [ebp - 0x84]
sub edi, 0x468df0
add ebx, edi
cmp byte [ebp - 0xac], 0
mov edi, 0x468df0
jne 0x405e45
cmp dword [ebp - 0x8c], 0
je 0x405fb8
push ebx
push 0xa
push 0x468df0
mov byte [0x45c2b1], 0
call dword [sym.imp.MSVCR100.dll_memchr]
mov esi, eax
add esp, 0xc
test esi, esi
je 0x405fa7
mov eax, esi
sub eax, edi
lea ecx, [ebx - 1]
cmp eax, ecx
je 0x405fa0
lea edx, [ebx - 2]
cmp eax, edx
jne 0x405e87
cmp byte [esi + 1], 0xd
je 0x405fa0
mov ecx, dword [0x46d75c]
inc eax
test ecx, ecx
je 0x405ea2
mov edx, dword [0x46d760]
push edx
push eax
push edi
call ecx
add esp, 0xc
jmp 0x405eb6
mov ecx, dword [ebp - 0x84]
push ecx
push 1
push eax
push edi
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
sub edi, esi
cmp byte [ebp - 0xac], 0
lea ebx, [ebx + edi - 1]
lea edi, [esi + 1]
je 0x405f42
mov eax, dword [0x46d75c]
test eax, eax
je 0x405ee8
mov edx, dword [0x46d760]
push edx
lea ecx, [ebp - 0x88]
push 3
push ecx
call eax
add esp, 0xc
jmp 0x405f03
mov edx, dword [ebp - 0x84]
push edx
push 1
lea eax, [ebp - 0x88]
push 3
push eax
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
mov eax, dword [0x46d75c]
test eax, eax
je 0x405f25
mov ecx, dword [0x46d760]
mov edx, dword [ebp - 0x94]
push ecx
push edx
lea ecx, [ebp - 0x24]
push ecx
call eax
add esp, 0xc
jmp 0x405f42
mov edx, dword [ebp - 0x84]
mov eax, dword [ebp - 0x94]
push edx
push 1
push eax
lea ecx, [ebp - 0x24]
push ecx
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
cmp dword [ebp - 0x8c], 0
je 0x405f87
lea eax, [ebp - 0x4c]
call fcn.004053f0
mov ecx, dword [0x46d75c]
test ecx, ecx
je 0x405f70
mov edx, dword [0x46d760]
push edx
push eax
lea eax, [ebp - 0x4c]
push eax
call ecx
add esp, 0xc
jmp 0x405f87
mov ecx, dword [ebp - 0x84]
push ecx
push 1
push eax
lea edx, [ebp - 0x4c]
push edx
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
push ebx
push 0xa
push edi
call dword [sym.imp.MSVCR100.dll_memchr]
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x405e67
jmp 0x405fa7
mov byte [0x45c2b1], 1
mov al, byte [ebp - 0xac]
mov esi, dword [ebp - 0x84]
mov byte [0x46d788], al
mov eax, dword [0x46d75c]
test eax, eax
je 0x405fd1
mov ecx, dword [0x46d760]
push ecx
push ebx
push edi
call eax
add esp, 0xc
jmp 0x405fdf
push esi
push 1
push ebx
push edi
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
cmp byte [ebp - 0x7d], 0
je 0x406019
cmp dword [0x46d75c], 0
je 0x406004
mov edx, dword [str._WARNING__]
push edx
push str._n_sdata_was_truncated_n
call fcn.004053c0
add esp, 8
jmp 0x406019
mov eax, dword [str._WARNING__]
push eax
push str._n_sdata_was_truncated_n
push esi
call dword [sym.imp.MSVCR100.dll_fprintf]
add esp, 0xc
cmp dword [0x46d75c], 0
jne 0x40602c
push esi
call dword [sym.imp.MSVCR100.dll_fflush]
add esp, 4
cmp dword [0x46adf0], 0
mov dword [ebp - 0x8c], 0
je 0x4060cf
xor ebx, ebx
mov edi, 0x46adf0
lea ebx, [ebx]
mov esi, dword [edi]
mov eax, 0x468df0
call fcn.004056d0
test al, al
je 0x4060ac
cmp dword [0x46d75c], 0
je 0x40607b
mov ecx, dword [edi]
push ecx
push str._nDpTrc:_found_match_for_pattern___s__in_output_n
call fcn.004053c0
add esp, 8
jmp 0x406093
mov edx, dword [edi]
mov eax, dword [ebp - 0x84]
push edx
push str._nDpTrc:_found_match_for_pattern___s__in_output_n
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
add esp, 0xc
mov ebx, dword [ebx + 0x46adf4]
test ebx, ebx
je 0x4060ac
mov ecx, dword [edi]
mov edx, dword [ebp - 0xa0]
push ecx
push edx
call ebx
add esp, 8
mov eax, dword [ebp - 0x8c]
inc eax
lea ebx, [eax*8]
cmp dword [ebx + 0x46adf0], 0
lea edi, [ebx + 0x46adf0]
mov dword [ebp - 0x8c], eax
jne 0x406050
push 0
call dword [sym.imp.MSVCR100.dll__time64]
add esp, 4
cmp dword [0x45c2cc], 0
jle 0x4061ba
mov edi, dword [ebp - 0x98]
test edi, edi
je 0x406120
mov ecx, dword [edi + 0x18]
mov esi, dword [edi + 0x1c]
mov ebx, ecx
and ebx, esi
cmp ebx, 0xffffffff
je 0x406120
add ecx, 0xa
adc esi, 0
cmp edx, esi
jl 0x4061ba
jg 0x406118
cmp eax, ecx
jbe 0x4061ba
mov dword [edi + 0x18], eax
mov dword [edi + 0x1c], edx
jmp 0x40614b
mov esi, dword [0x46d790]
mov ecx, dword [0x46d794]
add esi, 0xa
adc ecx, 0
cmp edx, ecx
jl 0x4061ba
jg 0x406140
cmp eax, esi
jbe 0x4061ba
mov dword [0x46d790], eax
mov dword [0x46d794], edx
cmp dword [0x46d75c], 0
jne 0x4061ba
mov esi, dword [ebp - 0x84]
push esi
call dword [sym.imp.MSVCR100.dll__fileno]
lea ecx, [ebp - 0x7c]
push ecx
push eax
call dword [sym.imp.MSVCR100.dll__fstat64i32]
add esp, 0xc
test eax, eax
jne 0x4061ba
mov eax, dword [ebp - 0x68]
cmp eax, dword [0x45c2cc]
jle 0x4061ba
cmp dword [0x46d75c], 0
push eax
push str._nDpTrc:_maximum_file_size_reached:__d_n
je 0x406197
call fcn.004053c0
add esp, 8
jmp 0x4061a1
push esi
call dword [sym.imp.MSVCR100.dll_fprintf]
add esp, 0xc
mov eax, dword [0x468de0]
test eax, eax
je 0x4061ba
mov edx, dword [ebp - 0x68]
mov ecx, dword [ebp - 0xa0]
push edx
push ecx
call eax
add esp, 8
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040981a
mov esp, ebp
pop ebp
ret