Function at 0x4a6400
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x19c
mov eax, dword [0x641a90]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
mov edx, ecx
mov eax, dword [ebp + 0x14]
push ebx
push esi
xor ebx, ebx
movzx eax, ax
xor esi, esi
mov dword [ebp - 0x188], 0
cmp dword [ebp + 0x10], 1
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x190], edx
mov dword [ebp - 0x194], ebx
mov dword [ebp - 0x19c], 1
jle 0x4a6787
test ax, ax
mov dword [ebp - 0x198], ebx
mov eax, ebx
setne al
add eax, 3
mov dword [ebp - 0x198], eax
lea esp, [esp]
add ecx, eax
mov ah, byte [edx]
mov dword [ebp - 0x18c], ecx
cmp byte [ecx], ah
jne 0x4a652e
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x4a652e
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x4a652e
test esi, esi
je 0x4a64cd
push dword [edi]
lea eax, [esi - 1]
push eax
call fcn.005958b3
push dword [edi]
lea eax, [ebp - 0x184]
push esi
push 3
push eax
call fcn.0059628c
add esp, 0x18
cmp eax, esi
jne 0x4a66ad
mov ecx, dword [ebp - 0x18c]
xor esi, esi
inc ebx
mov dword [ebp - 0x194], ebx
cmp ebx, 0xffff
jne 0x4a6684
push dword [edi]
push 0x80
call fcn.005958b3
push dword [edi]
push 0xff
call fcn.005958b3
push dword [edi]
push 0xff
call fcn.005958b3
push dword [edi]
push 1
push 3
push dword [ebp - 0x18c]
call fcn.0059628c
add esp, 0x28
cmp eax, 1
jne 0x4a66bc
xor ebx, ebx
mov dword [ebp - 0x194], ebx
jmp 0x4a667e
mov al, byte [edx + 1]
lea ecx, [esi + esi*2]
mov byte [ebp + ecx - 0x183], al
mov al, byte [edx + 2]
mov byte [ebp + ecx - 0x184], ah
mov byte [ebp + ecx - 0x182], al
test ebx, ebx
je 0x4a6652
push dword [edi]
cmp ebx, 0x80
jl 0x4a6622
push 0x80
call fcn.005958b3
push dword [edi]
inc ebx
mov eax, ebx
sar eax, 8
push eax
call fcn.005958b3
push dword [edi]
movzx eax, bl
push eax
call fcn.005958b3
push dword [edi]
push 1
push 3
push dword [ebp - 0x190]
call fcn.0059628c
add esp, 0x28
cmp eax, 1
je 0x4a6648
mov ebx, dword [ebp - 0x194]
mov dword [ebp - 0x188], 6
test ebx, ebx
je 0x4a670c
cmp ebx, 0x80
jl 0x4a66cd
mov esi, dword [ebp - 0x188]
push dword [edi]
push 0x80
call fcn.005958b3
push dword [edi]
inc ebx
mov eax, ebx
sar eax, 8
push eax
call fcn.005958b3
push dword [edi]
movzx eax, bl
push eax
call fcn.005958b3
push dword [edi]
push 1
push 3
push dword [ebp - 0x18c]
call fcn.0059628c
add esp, 0x28
cmp eax, 1
jne 0x4a675d
pop edi
mov ax, si
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
mov eax, ebx
or eax, 0x80
push eax
call fcn.005958b3
push dword [edi]
push 1
push 3
push dword [ebp - 0x190]
call fcn.0059628c
add esp, 0x18
cmp eax, 1
jne 0x4a66ad
xor ebx, ebx
mov dword [ebp - 0x194], ebx
jmp 0x4a6653
inc esi
cmp esi, 0x80
jne 0x4a667e
push dword [edi]
push 0x7f
call fcn.005958b3
push dword [edi]
lea eax, [ebp - 0x184]
push esi
push 3
push eax
call fcn.0059628c
add esp, 0x18
cmp eax, esi
jne 0x4a66c6
xor esi, esi
mov ecx, dword [ebp - 0x18c]
mov eax, dword [ebp - 0x19c]
mov edx, ecx
inc eax
mov dword [ebp - 0x190], edx
mov dword [ebp - 0x19c], eax
cmp eax, dword [ebp + 0x10]
jge 0x4a65b2
mov eax, dword [ebp - 0x198]
jmp 0x4a6470
mov dword [ebp - 0x188], 6
jmp 0x4a65b2
mov esi, 6
jmp 0x4a65cc
mov ebx, 6
jmp 0x4a6716
push dword [edi]
or ebx, 0x80
push ebx
call fcn.005958b3
push dword [edi]
push 1
push 3
push dword [ebp - 0x18c]
call fcn.0059628c
add esp, 0x18
cmp eax, 1
jne 0x4a675d
mov ax, word [ebp - 0x188]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
test esi, esi
je 0x4a6787
mov ebx, dword [ebp - 0x188]
mov edx, dword [ebp - 0x190]
lea ecx, [esi + esi*2]
push dword [edi]
push esi
mov al, byte [edx]
mov byte [ebp + ecx - 0x184], al
mov al, byte [edx + 1]
mov byte [ebp + ecx - 0x183], al
mov al, byte [edx + 2]
mov byte [ebp + ecx - 0x182], al
call fcn.005958b3
push dword [edi]
inc esi
lea eax, [ebp - 0x184]
push esi
push 3
push eax
call fcn.0059628c
add esp, 0x18
cmp eax, esi
je 0x4a6773
pop edi
pop esi
mov eax, 6
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov ax, bx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
push dword [edi]
push 0
call fcn.005958b3
push dword [edi]
push 1
push 3
push dword [ebp - 0x190]
call fcn.0059628c
add esp, 0x18
mov ecx, 6
cmp eax, 1
mov eax, dword [ebp - 0x188]
cmovne eax, ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005920c1
mov esp, ebp
pop ebp
ret