Function at 0x9fe820
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov ecx, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
test ecx, 0x100000
je 0x9fe940
mov eax, ecx
shr eax, 0x13
xor eax, 1
and eax, 1
mov dword [ebx + 0xc], eax
mov dword [ebx + 0x10], 0
mov edx, ecx
mov esi, 4
shr edx, 0x11
and edx, 3
sub esi, edx
mov edx, ecx
shr edx, 0xa
and edx, 3
cmp edx, 3
mov dword [ebx + 0x18], esi
je 0x9fea23
mov edi, dword [ebx + 0x10]
test edi, edi
jne 0x9fe953
mov eax, dword [ebx + 0xc]
lea edi, [eax + eax*2]
lea esi, [edx + edi]
mov dword [ebx + 0x24], esi
mov edx, dword [ebx + 0x10]
mov esi, ecx
shr esi, 0x10
xor esi, 1
and esi, 1
test edx, edx
mov dword [ebx + 0x1c], esi
jne 0x9fe960
mov eax, ecx
shr eax, 0xc
and eax, 0xf
mov dword [ebx + 0x20], eax
mov eax, ecx
mov edi, ecx
shr eax, 9
mov esi, ecx
and eax, 1
mov edx, ecx
shr edi, 8
and edi, 1
mov dword [ebx + 0x28], eax
mov eax, ecx
shr esi, 6
shr eax, 3
and esi, 3
mov dword [ebx + 0x2c], edi
mov edi, ecx
and eax, 1
and ecx, 3
shr edx, 4
shr edi, 2
and edx, 3
and edi, 1
mov dword [ebx + 0x30], esi
mov dword [ebx + 0x38], eax
mov eax, dword [ebx + 0x18]
mov dword [ebx + 0x40], ecx
xor ecx, ecx
cmp dword [ebx + 0x30], 3
mov dword [ebx + 0x34], edx
mov dword [ebx + 0x3c], edi
setne cl
add ecx, 1
cmp eax, 2
mov dword [ebx], ecx
je 0x9fe970
cmp eax, 3
je 0x9fe9c0
mov ebx, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], eax
mov dword [esp + 4], 0xbffd30
add ebx, 0x40
mov dword [esp], ebx
call sub.msvcrt.dll_fprintf
add esp, 0x1c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebx + 0xc], 1
mov dword [ebx + 0x10], 1
jmp 0x9fe850
lea eax, [edx + 6]
mov dword [ebx + 0x24], eax
jmp 0x9fe88a
mov eax, ecx
shr eax, 0xc
and eax, 0xf
mov dword [ebx + 0x20], eax
jmp 0x9fe8ab
mov eax, dword [ebx + 0xc]
mov esi, dword [ebx + 0x24]
mov dword [ebx + 0x54], 0
mov dword [ebx + 0x50], 0x20
lea ecx, [eax + eax*2]
shl ecx, 4
add ecx, dword [ebx + 0x20]
imul edi, dword [ecx*4 + 0xbffda0], 0x23280
mov edx, edi
mov eax, edi
sar edx, 0x1f
idiv dword [esi*4 + 0xbffee0]
mov edx, dword [ebx + 0x28]
sub edx, 4
add edx, eax
mov eax, 1
mov dword [ebx + 0x44], edx
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [ebx + 0x20]
test edx, edx
jne 0x9fe9e0
mov dword [ebx + 0x44], 0
add esp, 0x1c
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [ebx + 0xc]
mov eax, dword [ebx + 0x24]
lea edi, [ecx + ecx*2]
shl edi, 4
add edi, edx
imul esi, dword [edi*4 + 0xbffde0], 0x23280
mov edi, dword [eax*4 + 0xbffee0]
mov edx, esi
mov eax, esi
shl edi, cl
sar edx, 0x1f
idiv edi
mov edx, dword [ebx + 0x28]
sub edx, 4
add edx, eax
mov eax, 1
mov dword [ebx + 0x44], edx
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0xd
mov dword [esp + 4], 1
mov dword [esp], 0xbffd20
add ecx, 0x40
mov dword [esp + 0xc], ecx
call sub.msvcrt.dll_fwrite
mov dword [esp], 1
call sub.msvcrt.dll_exit
nop
nop
nop
nop
nop
nop
nop
nop
push ebp
mov ebp, esp
push ebx
sub esp, 4
mov edx, dword [ebp + 8]
mov ebx, dword [edx + 4]
mov eax, dword [ebx + 0xc]
test eax, eax
mov dword [edx + 4], eax
je 0x9fea95
mov dword [eax + 0x10], 0
mov eax, dword [ebx]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov dword [ebp + 8], ebx
add esp, 4
pop ebx
pop ebp
jmp sub.msvcrt.dll_free
mov dword [edx], 0
mov dword [edx + 4], 0
jmp 0x9fea7e