Function at 0x40919c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffdc
push ebx
push esi
push edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [0x40fc50]
mov dword [ebp - 0x1c], eax
mov ax, word [0x40fc54]
mov word [ebp - 0x1e], ax
mov si, word [0x40fc68]
mov eax, dword [0x40e5b8]
mov edx, dword [ebp - 0xc]
mov ax, word [eax + edx*2]
mov word [ebp - 0x16], ax
mov eax, dword [0x40e5b8]
mov edx, dword [ebp + 8]
mov ax, word [eax + edx*2]
mov word [ebp - 0x18], ax
lea ecx, [ebp - 0x1e]
lea edx, [ebp - 0x1c]
mov ax, word [ebp - 0xc]
call fcn.00408a78
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov dx, word [ebp - 0x1c]
and dx, word [ebp - 0x16]
movzx edx, dx
shl edx, 3
add eax, edx
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
movsx ebx, byte [eax]
cmp bx, 0x10
jbe 0x40927b
cmp bx, 0x10
jbe 0x40927b
cmp bx, 0x63
jne 0x409230
mov edi, 1
jmp 0x4094e1
lea ecx, [ebp - 0x1e]
lea edx, [ebp - 0x1c]
mov eax, dword [ebp - 0x14]
movsx eax, byte [eax + 1]
call fcn.00408aa4
sub bx, 0x10
lea ecx, [ebp - 0x1e]
lea edx, [ebp - 0x1c]
mov eax, ebx
call fcn.00408a78
movzx eax, bx
mov edx, dword [0x40e5b8]
movzx eax, word [edx + eax*2]
and eax, dword [ebp - 0x1c]
shl eax, 3
mov edx, dword [ebp - 0x14]
add eax, dword [edx + 4]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
movsx ebx, byte [eax]
cmp bx, 0x10
ja 0x409220
lea ecx, [ebp - 0x1e]
lea edx, [ebp - 0x1c]
mov eax, dword [ebp - 0x14]
movsx eax, byte [eax + 1]
call fcn.00408aa4
cmp bx, 0x10
jne 0x4092e8
movzx eax, si
mov edx, dword [0x40fc5c]
mov ecx, dword [ebp - 0x14]
mov cl, byte [ecx + 2]
mov byte [edx + eax], cl
inc esi
cmp si, 0x8000
jne 0x4091e7
push 0
lea eax, [ebp - 0x24]
push eax
movzx eax, si
push eax
mov eax, dword [0x40fc5c]
push eax
mov eax, dword [0x40e524]
mov eax, dword [eax]
push eax
call sub.kernel32.dll_WriteFile_1
mov ecx, dword [0x40e484]
movzx edx, si
mov eax, dword [0x40fc5c]
call fcn.00409c38
xor esi, esi
jmp 0x4091e7
cmp bx, 0xf
je 0x4094c6
lea ecx, [ebp - 0x1e]
lea edx, [ebp - 0x1c]
mov eax, ebx
call fcn.00408a78
movzx eax, bx
mov edx, dword [0x40e5b8]
mov ax, word [edx + eax*2]
and ax, word [ebp - 0x1c]
mov edx, dword [ebp - 0x14]
add ax, word [edx + 2]
mov word [ebp - 0xe], ax
lea ecx, [ebp - 0x1e]
lea edx, [ebp - 0x1c]
mov eax, ebx
call fcn.00408aa4
lea ecx, [ebp - 0x1e]
lea edx, [ebp - 0x1c]
mov ax, word [ebp + 8]
call fcn.00408a78
mov eax, dword [ebp - 8]
mov eax, dword [eax]
movzx edx, word [ebp - 0x18]
and edx, dword [ebp - 0x1c]
shl edx, 3
add eax, edx
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
movsx ebx, byte [eax]
cmp bx, 0x10
jbe 0x4093b6
cmp bx, 0x63
jne 0x409367
mov edi, 1
jmp 0x4094e1
lea ecx, [ebp - 0x1e]
lea edx, [ebp - 0x1c]
mov eax, dword [ebp - 0x14]
movsx eax, byte [eax + 1]
call fcn.00408aa4
sub bx, 0x10
lea ecx, [ebp - 0x1e]
lea edx, [ebp - 0x1c]
mov eax, ebx
call fcn.00408a78
movzx eax, bx
mov edx, dword [0x40e5b8]
mov ax, word [edx + eax*2]
and ax, word [ebp - 0x1c]
movzx eax, ax
shl eax, 3
mov edx, dword [ebp - 0x14]
add eax, dword [edx + 4]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
movsx ebx, byte [eax]
cmp bx, 0x10
ja 0x409357
lea ecx, [ebp - 0x1e]
lea edx, [ebp - 0x1c]
mov eax, dword [ebp - 0x14]
movsx eax, byte [eax + 1]
call fcn.00408aa4
lea ecx, [ebp - 0x1e]
lea edx, [ebp - 0x1c]
mov eax, ebx
call fcn.00408a78
mov eax, dword [ebp - 0x14]
mov edi, esi
sub di, word [eax + 2]
movzx eax, bx
mov edx, dword [0x40e5b8]
mov ax, word [edx + eax*2]
and ax, word [ebp - 0x1c]
sub di, ax
lea ecx, [ebp - 0x1e]
lea edx, [ebp - 0x1c]
mov eax, ebx
call fcn.00408aa4
and di, 0x7fff
cmp si, di
jae 0x409412
mov bx, 0x8000
sub bx, di
jmp 0x409419
mov bx, 0x8000
sub bx, si
cmp bx, word [ebp - 0xe]
jbe 0x409423
mov bx, word [ebp - 0xe]
sub word [ebp - 0xe], bx
movzx edx, si
movzx eax, di
sub edx, eax
movzx ecx, bx
cmp edx, ecx
jl 0x40945d
movzx edx, si
mov ecx, dword [0x40fc5c]
lea edx, [ecx + edx]
push edx
mov edx, dword [0x40fc5c]
lea eax, [edx + eax]
movzx ecx, bx
pop edx
call fcn.00402a00
add si, bx
add di, bx
jmp 0x40947d
movzx eax, di
mov edx, dword [0x40fc5c]
mov al, byte [edx + eax]
movzx edx, si
mov ecx, dword [0x40fc5c]
mov byte [ecx + edx], al
inc esi
inc edi
dec ebx
test bx, bx
ja 0x40945d
cmp si, 0x8000
jne 0x4094b6
push 0
lea eax, [ebp - 0x24]
push eax
movzx eax, si
push eax
mov eax, dword [0x40fc5c]
push eax
mov eax, dword [0x40e524]
mov eax, dword [eax]
push eax
call sub.kernel32.dll_WriteFile_1
mov ecx, dword [0x40e484]
movzx edx, si
mov eax, dword [0x40fc5c]
call fcn.00409c38
xor esi, esi
cmp word [ebp - 0xe], 0
jne 0x4093ff
jmp 0x4091e7
mov word [0x40fc68], si
mov eax, dword [ebp - 0x1c]
mov dword [0x40fc50], eax
mov ax, word [ebp - 0x1e]
mov word [0x40fc54], ax
xor edi, edi
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4