Function at 0x404f6c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe0
push ebx
push esi
push edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [0x40b98c]
mov dword [ebp - 0x18], eax
mov ax, word [0x40b990]
mov word [ebp - 0x1a], ax
mov si, word [0x40b9a4]
mov eax, dword [0x40a2fc]
mov edx, dword [ebp - 0xc]
mov ax, word [eax + edx*2]
mov word [ebp - 0x10], ax
mov eax, dword [0x40a2fc]
mov edx, dword [ebp + 8]
mov ax, word [eax + edx*2]
mov word [ebp - 0x12], ax
lea ecx, [ebp - 0x1a]
lea edx, [ebp - 0x18]
mov ax, word [ebp - 0xc]
call fcn.004048a4
mov edi, dword [ebp - 4]
mov edi, dword [edi]
mov ax, word [ebp - 0x18]
and ax, word [ebp - 0x10]
movzx eax, ax
shl eax, 3
add edi, eax
movsx ebx, byte [edi]
cmp bx, 0x10
jbe 0x40503b
cmp bx, 0x10
jbe 0x40503b
cmp bx, 0x63
jne 0x404ffa
mov eax, 1
jmp 0x405284
lea ecx, [ebp - 0x1a]
lea edx, [ebp - 0x18]
movsx eax, byte [edi + 1]
call fcn.004048c8
sub bx, 0x10
lea ecx, [ebp - 0x1a]
lea edx, [ebp - 0x18]
mov eax, ebx
call fcn.004048a4
movzx eax, bx
mov edx, dword [0x40a2fc]
movzx eax, word [edx + eax*2]
and eax, dword [ebp - 0x18]
shl eax, 3
add eax, dword [edi + 4]
mov edi, eax
movsx ebx, byte [edi]
cmp bx, 0x10
ja 0x404fea
lea ecx, [ebp - 0x1a]
lea edx, [ebp - 0x18]
movsx eax, byte [edi + 1]
call fcn.004048c8
cmp bx, 0x10
jne 0x4050a2
movzx eax, si
mov edx, dword [0x40b998]
mov cl, byte [edi + 2]
mov byte [edx + eax], cl
inc esi
cmp si, 0x8000
jne 0x404fb7
push 0
lea eax, [ebp - 0x20]
push eax
movzx eax, si
push eax
mov eax, dword [0x40b998]
push eax
mov eax, dword [0x40a2d8]
mov eax, dword [eax]
push eax
call sub.kernel32.dll_WriteFile_1
mov ecx, dword [0x40a2a0]
movzx edx, si
mov eax, dword [0x40b998]
call fcn.004059dc
xor esi, esi
jmp 0x404fb7
cmp bx, 0xf
je 0x405269
lea ecx, [ebp - 0x1a]
lea edx, [ebp - 0x18]
mov eax, ebx
call fcn.004048a4
movzx eax, bx
mov edx, dword [0x40a2fc]
mov ax, word [edx + eax*2]
and ax, word [ebp - 0x18]
add ax, word [edi + 2]
mov word [ebp - 0xe], ax
lea ecx, [ebp - 0x1a]
lea edx, [ebp - 0x18]
mov eax, ebx
call fcn.004048c8
lea ecx, [ebp - 0x1a]
lea edx, [ebp - 0x18]
mov ax, word [ebp + 8]
call fcn.004048a4
mov edi, dword [ebp - 8]
mov edi, dword [edi]
movzx eax, word [ebp - 0x12]
and eax, dword [ebp - 0x18]
shl eax, 3
add edi, eax
movsx ebx, byte [edi]
cmp bx, 0x10
jbe 0x40515d
cmp bx, 0x63
jne 0x405118
mov eax, 1
jmp 0x405284
lea ecx, [ebp - 0x1a]
lea edx, [ebp - 0x18]
movsx eax, byte [edi + 1]
call fcn.004048c8
sub bx, 0x10
lea ecx, [ebp - 0x1a]
lea edx, [ebp - 0x18]
mov eax, ebx
call fcn.004048a4
movzx eax, bx
mov edx, dword [0x40a2fc]
mov ax, word [edx + eax*2]
and ax, word [ebp - 0x18]
movzx eax, ax
shl eax, 3
add eax, dword [edi + 4]
mov edi, eax
movsx ebx, byte [edi]
cmp bx, 0x10
ja 0x405108
lea ecx, [ebp - 0x1a]
lea edx, [ebp - 0x18]
movsx eax, byte [edi + 1]
call fcn.004048c8
lea ecx, [ebp - 0x1a]
lea edx, [ebp - 0x18]
mov eax, ebx
call fcn.004048a4
mov eax, esi
sub ax, word [edi + 2]
movzx edx, bx
mov ecx, dword [0x40a2fc]
mov dx, word [ecx + edx*2]
and dx, word [ebp - 0x18]
sub ax, dx
mov edi, eax
lea ecx, [ebp - 0x1a]
lea edx, [ebp - 0x18]
mov eax, ebx
call fcn.004048c8
and di, 0x7fff
cmp si, di
jae 0x4051b5
mov bx, 0x8000
sub bx, di
jmp 0x4051bc
mov bx, 0x8000
sub bx, si
cmp bx, word [ebp - 0xe]
jbe 0x4051c6
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 0x405200
movzx edx, si
mov ecx, dword [0x40b998]
lea edx, [ecx + edx]
push edx
mov edx, dword [0x40b998]
lea eax, [edx + eax]
movzx ecx, bx
pop edx
call fcn.004025a0
add si, bx
add di, bx
jmp 0x405220
movzx eax, di
mov edx, dword [0x40b998]
mov al, byte [edx + eax]
movzx edx, si
mov ecx, dword [0x40b998]
mov byte [ecx + edx], al
inc esi
inc edi
dec ebx
test bx, bx
ja 0x405200
cmp si, 0x8000
jne 0x405259
push 0
lea eax, [ebp - 0x20]
push eax
movzx eax, si
push eax
mov eax, dword [0x40b998]
push eax
mov eax, dword [0x40a2d8]
mov eax, dword [eax]
push eax
call sub.kernel32.dll_WriteFile_1
mov ecx, dword [0x40a2a0]
movzx edx, si
mov eax, dword [0x40b998]
call fcn.004059dc
xor esi, esi
cmp word [ebp - 0xe], 0
jne 0x4051a2
jmp 0x404fb7
mov word [0x40b9a4], si
mov eax, dword [ebp - 0x18]
mov dword [0x40b98c], eax
mov ax, word [ebp - 0x1a]
mov word [0x40b990], ax
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4