Function at 0x401b66
Capabilities:
Write file on windows

Disassembly:
inc eax
push ebp
mov ebp, esp
sub esp, 0x20
pushal
xor ebx, ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
mov ebx, dword [ebp + 8]
mov eax, 0x40ef10
mov dword [ebp - 0x14], eax
mov edx, dword [eax - 4]
test edx, edx
jne 0x401b8f
call fcn.0040272e
inc edx
and ebx, 0x1f
xor edi, edi
mov esi, dword [ebp + ebx*4 + 8]
mov eax, dword [ebp - 0x14]
cmp esi, 0x7f
jne 0x401bb5
dec edx
jg 0x401ba7
add edx, 0xf
mov eax, dword [eax + edx*8 + 4]
test eax, eax
jns 0x401bb1
neg eax
add edi, eax
jmp 0x401bef
cmp esi, 0x78
jae 0x401bc0
add edi, dword [eax + esi*8 - 0x4c]
jmp 0x401bef
push esi
test byte [ebp + 9], 4
jne 0x401bce
call fcn.00402649
jmp 0x401bd5
call fcn.0040260f
add eax, eax
cmp dword [ebp + 8], 0x40
jl 0x401be6
mov ecx, dword [0x4067de]
cmp ecx, eax
jbe 0x401be6
xchg ecx, eax
mov dword [ebx*4 + 0x4050b0], eax
add edi, eax
dec ebx
jne 0x401b95
mov dword [ebp - 4], edi
mov ebx, dword [ebp + 8]
dec edx
jg 0x401bfe
add edx, 0xf
cmp bh, 8
jne 0x401c13
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + edx*8]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [eax + edx*8 + 4]
mov dword [ebp - 0x20], ecx
mov eax, dword [ebp - 4]
add eax, 0x18
mov dword [ebp - 8], eax
push edx
test ebx, ebx
jns 0x401c69
bt ebx, 0x1e
jae 0x401c33
call fcn.00401e01
call fcn.004022b7
jmp 0x401c67
mov eax, 0x40abfc
cmp dword [ebp - 0xc], eax
je 0x401c67
mov eax, dword [ebp - 0x14]
mov esi, dword [eax + edx*8 - 0xc8]
mov edi, dword [esi]
cmp dword [esi + 4], 0
jle 0x401c52
mov dword [ebp - 0x10], edi
push dword [ebp - 4]
pop dword [esi + 4]
call fcn.00401e01
mov dword [esi], eax
test eax, eax
je 0x401a0e
jmp 0x401c8e
call fcn.004026e1
mov ecx, eax
add ecx, dword [ebp - 8]
mov ebx, 0x4ab3a8
cmp ecx, ebx
jbe 0x401c86
call fcn.00401e01
mov dword [ebp - 0x18], eax
jmp 0x401c8e
push 1
push ecx
call fcn.004026f3
pop edx
mov ebx, dword [ebp + 8]
mov edi, eax
and ebx, 0x1f
push eax
and edi, edi
je 0x401cfb
mov esi, dword [ebp + ebx*4 + 8]
mov eax, dword [ebp - 0x14]
cmp esi, 0x7f
jne 0x401cbf
cmp edx, 0xf
jb 0x401caf
xor edx, edx
inc edx
mov ecx, dword [eax + edx*8 + 4]
test ecx, ecx
jns 0x401cba
neg ecx
mov esi, dword [eax + edx*8]
jmp 0x401cd5
cmp esi, 0x78
jae 0x401cce
mov ecx, dword [eax + esi*8 - 0x4c]
mov esi, dword [eax + esi*8 - 0x50]
jmp 0x401cd5
mov ecx, dword [ebx*4 + 0x4050b0]
cmp dword [esi], 0xffffff84
jne 0x401ce8
cmp dword [ebp + ebx*4 + 8], 0x7f
jne 0x401ce8
call fcn.00401e5e
jmp 0x401cf4
push ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
pop ecx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
dec ebx
jne 0x401c9c
xor eax, eax
stosw word es:[edi], ax
pop edi
mov dword [esp + 0x1c], edi
mov ebx, dword [ebp + 8]
test ebx, ebx
jns 0x401d3a
bt ebx, 0x1e
jae 0x401d1b
and ebx, 0x1f
push dword [ebp + ebx*4 + 0xc]
call fcn.00402308
jmp 0x401d35
mov ebx, 0x40abfc
cmp dword [ebp - 0xc], ebx
je 0x401e0c
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x401d35
call fcn.00401b02
jmp 0x401dea
cmp bh, 8
jne 0x401d56
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 4]
cmp eax, ecx
jae 0x401d4a
xchg ecx, eax
mov esi, edi
mov edi, dword [ebp - 0x1c]
rep movsb byte es:[edi], byte [esi]
jmp 0x401dde
cmp bh, 0x10
je 0x401d60
cmp bh, 0x18
jne 0x401d7a
push edi
push dword [0x40655a]
cmp bh, 0x10
jne 0x401d73
call sub.user32.dll_SetWindowTextA
jmp 0x401d78
call sub.user32.dll_SetWindowTextW
jmp 0x401dde
cmp ebx, 0x40
jb 0x401dc6
mov eax, dword [0x4067de]
and dword [0x4067de], 0
test eax, eax
jne 0x401d9f
mov eax, dword [ebp - 4]
cmp bh, 4
jb 0x401d9f
push edi
call fcn.0040260f
add eax, eax
mov ecx, ebx
shr ecx, 6
and ecx, 0xf
push edx
mov edx, esp
push 0
push edx
push eax
push edi
push dword [ecx*4 + 0x406782]
call sub.kernel32.dll_WriteFile
pop edx
test eax, eax
je 0x4019e0
jmp 0x401dde
and edi, edi
je 0x401dde
push edi
call fcn.00403d34
cmp bl, 0x20
jb 0x401dde
call fcn.00403d70
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x401dea
call fcn.00401b02
popal
mov edx, dword [ebp + 8]
leave
bt edx, 0x1e
adc edx, 2
and edx, 0x1f
lea esp, [esp + edx*4]
neg edx
jmp dword [esp + edx*4]
mov ecx, dword [ebx - 0xc]
test ecx, ecx
jns 0x401e15
neg ecx
sub ecx, dword [ebx - 4]
add dword [ebp - 8], ecx
call fcn.00401e01
mov edi, eax
push edi
mov esi, dword [ebx - 0x10]
mov ecx, dword [ebx - 8]
sub ecx, esi
rep movsb byte es:[edi], byte [esi]
push esi
mov esi, ebx
mov ecx, dword [ebp - 4]
rep movsb byte es:[edi], byte [esi]
pop esi
add esi, dword [ebx - 4]
lodsb al, byte [esi]
stosb byte es:[edi], al
cmp al, 0
jne 0x401e39
mov esi, dword [ebx - 0x14]
mov ecx, dword [ebx - 0xc]
test ecx, ecx
jle 0x401e50
mov eax, dword [esi]
call fcn.00401b02
pop edi
mov dword [esi], edi
mov eax, dword [ebp - 8]
sub eax, 0x18
mov dword [esi + 4], eax
jmp 0x401dea