Function at 0x40bb18
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd8
push ebx
push esi
push edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
mov dword [ebp - 0x10], eax
mov eax, dword [0x41090c]
mov dword [ebp - 0x20], eax
mov ax, word [0x410910]
mov word [ebp - 0x22], ax
mov si, word [0x410924]
mov eax, dword [ebp - 0xc]
mov ax, word [eax*2 + 0x40f3ac]
mov word [ebp - 0x1a], ax
mov eax, dword [ebp + 8]
mov ax, word [eax*2 + 0x40f3ac]
mov word [ebp - 0x1c], ax
mov eax, dword [0x40f4c8]
cmp byte [eax], 0
jne 0x40be90
lea ecx, [ebp - 0x22]
lea edx, [ebp - 0x20]
mov ax, word [ebp - 0xc]
call fcn.0040b3bc
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov dx, word [ebp - 0x20]
and dx, word [ebp - 0x1a]
movzx edx, dx
shl edx, 3
add eax, edx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
movsx ebx, byte [eax]
cmp bx, 0x10
jbe 0x40bc0a
cmp bx, 0x10
jbe 0x40bc0a
cmp bx, 0x63
jne 0x40bbbf
mov dword [ebp - 0x10], 1
jmp 0x40be90
lea ecx, [ebp - 0x22]
lea edx, [ebp - 0x20]
mov eax, dword [ebp - 0x18]
movsx eax, byte [eax + 1]
call fcn.0040b400
sub bx, 0x10
lea ecx, [ebp - 0x22]
lea edx, [ebp - 0x20]
mov eax, ebx
call fcn.0040b3bc
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 4]
movzx edx, bx
movzx edx, word [edx*2 + 0x40f3ac]
and edx, dword [ebp - 0x20]
shl edx, 3
add eax, edx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
movsx ebx, byte [eax]
cmp bx, 0x10
ja 0x40bbad
lea ecx, [ebp - 0x22]
lea edx, [ebp - 0x20]
mov eax, dword [ebp - 0x18]
movsx eax, byte [eax + 1]
call fcn.0040b400
cmp bx, 0x10
jne 0x40bc80
movzx eax, si
mov edx, dword [0x410918]
mov ecx, dword [ebp - 0x18]
mov cl, byte [ecx + 2]
mov byte [edx + eax], cl
inc esi
cmp si, 0x8000
jne 0x40bb66
push 0
lea eax, [ebp - 0x28]
push eax
movzx eax, si
push eax
mov eax, dword [0x410918]
push eax
mov eax, dword [0x40f5f4]
mov eax, dword [eax]
push eax
call sub.kernel32.dll_WriteFile_1
movzx ebx, si
mov eax, ebx
call fcn.0040d828
mov ecx, dword [0x40f544]
mov edx, ebx
mov eax, dword [0x410918]
call fcn.0040d980
xor esi, esi
jmp 0x40bb66
cmp bx, 0xf
je 0x40be72
lea ecx, [ebp - 0x22]
lea edx, [ebp - 0x20]
mov eax, ebx
call fcn.0040b3bc
mov eax, dword [ebp - 0x18]
mov ax, word [eax + 2]
movzx edx, bx
mov dx, word [edx*2 + 0x40f3ac]
and dx, word [ebp - 0x20]
add ax, dx
mov word [ebp - 0x12], ax
lea ecx, [ebp - 0x22]
lea edx, [ebp - 0x20]
mov eax, ebx
call fcn.0040b400
lea ecx, [ebp - 0x22]
lea edx, [ebp - 0x20]
mov ax, word [ebp + 8]
call fcn.0040b3bc
mov eax, dword [ebp - 8]
mov eax, dword [eax]
movzx edx, word [ebp - 0x1c]
and edx, dword [ebp - 0x20]
shl edx, 3
add eax, edx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
movsx ebx, byte [eax]
cmp bx, 0x10
jbe 0x40bd51
cmp bx, 0x63
jne 0x40bd02
mov dword [ebp - 0x10], 1
jmp 0x40be90
lea ecx, [ebp - 0x22]
lea edx, [ebp - 0x20]
mov eax, dword [ebp - 0x18]
movsx eax, byte [eax + 1]
call fcn.0040b400
sub bx, 0x10
lea ecx, [ebp - 0x22]
lea edx, [ebp - 0x20]
mov eax, ebx
call fcn.0040b3bc
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 4]
movzx edx, bx
mov dx, word [edx*2 + 0x40f3ac]
and dx, word [ebp - 0x20]
movzx edx, dx
shl edx, 3
add eax, edx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
movsx ebx, byte [eax]
cmp bx, 0x10
ja 0x40bcf0
lea ecx, [ebp - 0x22]
lea edx, [ebp - 0x20]
mov eax, dword [ebp - 0x18]
movsx eax, byte [eax + 1]
call fcn.0040b400
lea ecx, [ebp - 0x22]
lea edx, [ebp - 0x20]
mov eax, ebx
call fcn.0040b3bc
mov eax, dword [ebp - 0x18]
mov edi, esi
sub di, word [eax + 2]
movzx eax, bx
mov ax, word [eax*2 + 0x40f3ac]
and ax, word [ebp - 0x20]
sub di, ax
lea ecx, [ebp - 0x22]
lea edx, [ebp - 0x20]
mov eax, ebx
call fcn.0040b400
and di, 0x7fff
cmp si, di
jae 0x40bdab
mov bx, 0x8000
sub bx, di
jmp 0x40bdb2
mov bx, 0x8000
sub bx, si
cmp bx, word [ebp - 0x12]
jbe 0x40bdbc
mov bx, word [ebp - 0x12]
sub word [ebp - 0x12], bx
movzx edx, si
movzx eax, di
sub edx, eax
movzx ecx, bx
cmp edx, ecx
jl 0x40bdf6
movzx edx, si
mov ecx, dword [0x410918]
lea edx, [ecx + edx]
push edx
mov edx, dword [0x410918]
lea eax, [edx + eax]
movzx ecx, bx
pop edx
call fcn.00402a00
add si, bx
add di, bx
jmp 0x40be16
movzx eax, di
mov edx, dword [0x410918]
mov al, byte [edx + eax]
movzx edx, si
mov ecx, dword [0x410918]
mov byte [ecx + edx], al
inc esi
inc edi
dec ebx
test bx, bx
ja 0x40bdf6
cmp si, 0x8000
jne 0x40be58
push 0
lea eax, [ebp - 0x28]
push eax
movzx eax, si
push eax
mov eax, dword [0x410918]
push eax
mov eax, dword [0x40f5f4]
mov eax, dword [eax]
push eax
call sub.kernel32.dll_WriteFile_1
movzx ebx, si
mov eax, ebx
call fcn.0040d828
mov ecx, dword [0x40f544]
mov edx, ebx
mov eax, dword [0x410918]
call fcn.0040d980
xor esi, esi
mov eax, dword [0x40f4c8]
cmp byte [eax], 0
jne 0x40be90
cmp word [ebp - 0x12], 0
jne 0x40bd98
jmp 0x40bb66
mov word [0x410924], si
mov eax, dword [ebp - 0x20]
mov dword [0x41090c], eax
mov ax, word [ebp - 0x22]
mov word [0x410910], ax
xor eax, eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4