Function at 0x401ad0
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x6c
xor ebx, ebx
mov byte [esp + 0x23], 1
lea edx, [esp + 0x40]
mov dword [esp + 0x24], 0
mov dword [esp + 0x18], edx
mov esi, esi
mov ecx, dword [esp + 0x18]
mov edi, 0x401abb
mov dword [esp], ecx
call fcn.004039b0
mov dword [esp + 0x1c], ebx
mov edx, dword [esp + 0x80]
mov ecx, 2
cld
mov eax, dword [esp + 0x18]
mov ebp, dword [edx + ebx]
mov dword [esp + ebx + 0x38], eax
mov esi, ebp
repe cmpsb byte [esi], byte es:[edi]
jne 0x401eb0
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov esi, dword [esp + 0x1c]
mov dword [esp + esi + 0x30], eax
mov eax, dword [esp + ebx + 0x30]
test eax, eax
je 0x401e7b
mov dword [esp + 4], eax
mov ecx, dword [esp + ebx + 0x38]
mov dword [esp], ecx
call fcn.004038f0
mov dword [esp + ebx + 0x38], eax
call sub.msvcrt.dll__errno
inc dword [esp + 0x24]
mov edx, dword [eax]
add dword [esp + 0x18], 0xc
mov dword [esp + ebx + 0x28], edx
add ebx, 4
cmp dword [esp + 0x24], 1
jle 0x401af0
lea esi, [esi]
lea edi, [edi]
mov esi, dword [esp + 0x38]
test esi, esi
jne 0x401bb0
mov edx, dword [esp + 0x3c]
test edx, edx
je 0x401db9
test esi, esi
mov edi, 1
je 0x401d14
jmp 0x401bb0
mov edx, dword [esp + 0x3c]
mov edi, 0xffffffff
test edx, edx
je 0x401d55
cmp byte [section..bss], 0
jne 0x401d90
mov ebx, dword [edx + 4]
mov ebp, dword [esi + 4]
mov eax, ebx
cmp ebx, ebp
jbe 0x401bdc
mov eax, ebp
cld
mov edi, dword [edx + 8]
mov esi, dword [esi + 8]
lea ecx, [eax - 1]
cmp ecx, ecx
repe cmpsb byte [esi], byte es:[edi]
seta cl
setb dl
sub cl, dl
movsx edi, cl
test edi, edi
jne 0x401d10
cmp ebp, ebx
mov edi, 0xffffffff
jb 0x401c10
cmp ebp, ebx
setne bl
movzx edi, bl
mov esi, esi
test edi, edi
jne 0x401d10
cmp byte [0x407030], 0
mov edx, dword [sym.imp.msvcrt.dll__iob]
mov esi, dword [esp + 0x3c]
lea ebx, [edx + 0x20]
je 0x401c8e
cmp byte [0x407010], 0
je 0x401c4f
mov ebp, dword [ebx + 4]
dec ebp
test ebp, ebp
mov dword [ebx + 4], ebp
js 0x401cfa
mov ecx, dword [edx + 0x20]
mov byte [ecx], 9
inc dword [edx + 0x20]
cmp byte [0x407020], 0
je 0x401c70
mov edx, dword [ebx + 4]
dec edx
test edx, edx
mov dword [ebx + 4], edx
js 0x401ce5
mov ebp, dword [ebx]
mov byte [ebp], 9
inc dword [ebx]
nop
mov dword [esp + 0xc], ebx
mov ebx, dword [esi + 4]
mov dword [esp + 4], 1
mov dword [esp + 8], ebx
mov eax, dword [esi + 8]
mov dword [esp], eax
call sub.msvcrt.dll_fwrite
test edi, edi
js 0x401cb5
mov ecx, dword [esp + 0x3c]
mov ebp, dword [esp + 0x34]
mov dword [esp], ecx
mov dword [esp + 4], ebp
call fcn.004038f0
mov dword [esp + 0x3c], eax
call sub.msvcrt.dll__errno
mov edx, dword [eax]
mov dword [esp + 0x2c], edx
test edi, edi
jg 0x401b80
mov esi, dword [esp + 0x30]
mov ebx, dword [esp + 0x38]
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.004038f0
mov dword [esp + 0x38], eax
call sub.msvcrt.dll__errno
mov edi, dword [eax]
mov dword [esp + 0x28], edi
jmp 0x401b80
mov dword [esp + 4], ebx
mov dword [esp], 9
call sub.msvcrt.dll__flsbuf
jmp 0x401c70
mov dword [esp + 4], ebx
mov dword [esp], 9
call sub.msvcrt.dll__flsbuf
jmp 0x401c4f
test edi, edi
jle 0x401d55
cmp byte [0x407020], 0
mov edx, dword [sym.imp.msvcrt.dll__iob]
mov esi, dword [esp + 0x3c]
lea ebx, [edx + 0x20]
je 0x401c8e
cmp byte [0x407010], 0
je 0x401c70
mov ecx, dword [ebx + 4]
dec ecx
test ecx, ecx
mov dword [ebx + 4], ecx
js 0x401ce5
mov ebp, dword [edx + 0x20]
mov byte [ebp], 9
inc dword [edx + 0x20]
jmp 0x401c70
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov edx, dword [esp + 0x38]
add eax, 0x20
cmp byte [0x407010], 0
je 0x401c8e
mov dword [esp + 0xc], eax
mov esi, dword [edx + 4]
mov dword [esp + 4], 1
mov dword [esp + 8], esi
mov eax, dword [edx + 8]
jmp 0x401c86
mov ecx, dword [edx + 4]
dec ecx
mov dword [esp + 0xc], ecx
mov ebp, dword [edx + 8]
mov dword [esp + 8], ebp
mov edi, dword [esi + 4]
dec edi
mov dword [esp + 4], edi
mov ebx, dword [esi + 8]
mov dword [esp], ebx
call fcn.004037c0
mov edi, eax
jmp 0x401c10
mov dword [esp + 0x24], 0
lea esi, [esp + 0x48]
mov ecx, dword [esi]
mov dword [esp], ecx
call sub.msvcrt.dll_free
mov ebx, dword [esp + 0x24]
shl ebx, 2
mov eax, dword [esp + ebx + 0x30]
test byte [eax + 0xc], 0x20
jne 0x401e3f
mov dword [esp], eax
call sub.msvcrt.dll_fclose
test eax, eax
jne 0x401e07
inc dword [esp + 0x24]
add esi, 0xc
cmp dword [esp + 0x24], 1
jle 0x401dc5
movzx eax, byte [esp + 0x23]
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
call sub.msvcrt.dll__errno
mov edi, dword [esp + 0x24]
mov edx, dword [esp + 0x80]
mov ebp, dword [edx + edi*4]
mov dword [esp + 8], 0x401abd
mov dword [esp + 0xc], ebp
mov ebx, dword [eax]
mov dword [esp], 0
mov dword [esp + 4], ebx
call fcn.004051d0
mov byte [esp + 0x23], 0
jmp 0x401dec
mov eax, dword [esp + 0x80]
mov ecx, dword [esp + 0x24]
mov edi, dword [eax + ecx*4]
mov dword [esp + 8], 0x401abd
mov dword [esp + 0xc], edi
mov ebp, dword [esp + ebx + 0x28]
mov dword [esp], 0
mov dword [esp + 4], ebp
call fcn.004051d0
mov byte [esp + 0x23], 0
mov eax, dword [esp + ebx + 0x30]
jmp 0x401de0
call sub.msvcrt.dll__errno
mov ebp, dword [esp + 0x80]
mov edi, dword [ebp + ebx]
mov dword [esp + 8], 0x401abd
mov dword [esp + 0xc], edi
mov ebx, dword [eax]
mov dword [esp], 0
mov dword [esp + 4], ebx
call fcn.004051d0
xor eax, eax
jmp 0x401dff
mov dword [esp + 4], 0x401ac0
mov dword [esp], ebp
call sub.msvcrt.dll_fopen
jmp 0x401b2c