Function at 0x9f0e70
Capabilities:
Encode data using xor
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xbec
mov eax, dword [ebp + 8]
mov ebx, dword [eax + 0x130]
mov edx, dword [ebx + 0x21d14]
test edx, edx
jg 0x9f0ea1
mov edx, 0xffffffff
add esp, 0xbec
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
lea edi, [ebp - 0xbba]
mov dword [esp + 8], 0xb40
mov dword [esp + 4], 0
mov dword [esp], edi
call sub.msvcrt.dll_memset
mov esi, dword [ebp + 0xc]
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov dword [esp], esi
call sub.msvcrt.dll_fseek
mov ecx, dword [ebp + 0xc]
mov dword [esp], ecx
call sub.msvcrt.dll_ftell
test eax, eax
mov dword [ebp - 0xbd0], eax
je 0x9f0e8f
mov edx, dword [ebp + 0xc]
lea esi, [ebp - 0x16]
mov edi, 0xbff70c
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], edx
call sub.msvcrt.dll_fseek
mov eax, dword [ebp + 0xc]
mov dword [esp], esi
mov dword [esp + 8], 0xa
mov dword [esp + 4], 1
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fread
mov ecx, 3
cld
repe cmpsb byte [esi], byte es:[edi]
mov dword [ebp - 0xbcc], 0
seta dl
setb al
cmp dl, al
jne 0x9f0f81
movzx edi, byte [ebp - 0x10]
movzx eax, byte [ebp - 0xf]
movzx ecx, byte [ebp - 0xd]
movzx esi, byte [ebp - 0xe]
and edi, 0x7f
and eax, 0x7f
shl edi, 0x15
and ecx, 0x7f
shl eax, 0xe
and esi, 0x7f
or edi, eax
or edi, ecx
shl esi, 7
or edi, esi
add edi, 0xa
mov dword [ebp - 0xbcc], edi
mov edx, dword [ebp + 8]
lea edi, [ebp - 0xbba]
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp - 0xbcc]
mov dword [esp + 8], 0
add eax, dword [edx + 0x134]
mov dword [esp], ecx
mov dword [esp + 4], eax
call sub.msvcrt.dll_fseek
mov esi, dword [ebp + 0xc]
mov dword [esp], edi
mov edi, pe_nt_image_headers32
mov dword [esp + 8], 1
mov dword [esp + 4], 4
mov dword [esp + 0xc], esi
call sub.msvcrt.dll_fread
movzx edx, byte [ebp - 0xbb9]
mov eax, dword [ebp + 8]
mov byte [ebp - 0xbba], 0xff
and edx, 0xfffffff1
mov esi, edx
mov edx, dword [eax + 0x118]
cmp edx, 1
je 0x9f1008
cmp dword [eax + 0xc], 0x3e7f
setg al
movzx ecx, al
sub ecx, 1
and ecx, 0xffffffe0
lea edi, [ecx + 0x40]
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x88]
test eax, eax
jne 0x9f1018
mov edi, dword [ecx + 0x44]
mov eax, dword [ebp + 8]
xor ecx, ecx
cmp dword [eax + 0x38], 0
je 0x9f178c
sub edx, 1
je 0x9f17b2
movzx edx, byte [ebp - 0xbb8]
or esi, 2
mov eax, esi
mov byte [ebp - 0xbb9], al
and edx, 0xd
or ecx, edx
mov byte [ebp - 0xbb8], cl
lea ecx, [ebp - 0x7a]
mov dword [esp + 8], 0x64
mov dword [esp + 4], 0
mov dword [esp], ecx
call sub.msvcrt.dll_memset
mov edi, dword [ebp + 8]
mov esi, dword [edi + 0x38]
test esi, esi
jne 0x9f1639
mov edx, dword [ebx + 0x21d14]
test edx, edx
jle 0x9f125f
fnstcw word [ebp - 0xbbe]
mov esi, 1
movzx ecx, word [ebp - 0xbbe]
movzx eax, word [ebp - 0xbbe]
mov ch, 0xc
mov ah, 4
mov word [ebp - 0xbc0], cx
mov word [ebp - 0xbc6], ax
nop
mov edi, dword [ebx + 0x21d14]
push edi
fild dword [esp]
lea edx, [edi - 1]
fmul dword [0xbff728]
mov dword [esp], esi
fild dword [esp]
add esp, 4
fmulp st(1)
fldcw word [ebp - 0xbc6]
frndint
fldcw word [ebp - 0xbbe]
fldcw word [ebp - 0xbc0]
fistp dword [ebp - 0xbc4]
fldcw word [ebp - 0xbbe]
mov ecx, dword [ebp - 0xbc4]
cmp edx, ecx
jle 0x9f10fa
mov edx, ecx
mov eax, dword [ebx + 0x21d1c]
fild dword [eax + edx*4]
fmul dword [0xbff72c]
fild dword [ebx + 0x21d08]
fdivp st(1)
fldcw word [ebp - 0xbc0]
fistp dword [ebp - 0xbc4]
fldcw word [ebp - 0xbbe]
mov eax, dword [ebp - 0xbc4]
cmp eax, 0xff
jle 0x9f1135
mov eax, 0xff
mov byte [esi + ebp - 0x7a], al
mov edx, dword [ebx + 0x21d14]
lea edi, [esi + 1]
push edx
sub edx, 1
fild dword [esp]
fld dword [0xbff728]
fmul st(1), st(0)
mov dword [esp], edi
fild dword [esp]
add esp, 4
fmulp st(2)
fxch st(1)
fldcw word [ebp - 0xbc6]
frndint
fldcw word [ebp - 0xbbe]
fldcw word [ebp - 0xbc0]
fistp dword [ebp - 0xbc4]
fldcw word [ebp - 0xbbe]
mov eax, dword [ebp - 0xbc4]
cmp edx, eax
jle 0x9f118a
mov edx, eax
mov ecx, dword [ebx + 0x21d1c]
fild dword [ecx + edx*4]
fld dword [0xbff72c]
fmul st(1), st(0)
fild dword [ebx + 0x21d08]
fdivp st(2)
fxch st(1)
fldcw word [ebp - 0xbc0]
fistp dword [ebp - 0xbc4]
fldcw word [ebp - 0xbbe]
mov eax, dword [ebp - 0xbc4]
cmp eax, 0xff
jle 0x9f11c9
mov eax, 0xff
mov byte [esi + ebp - 0x79], al
mov edx, dword [ebx + 0x21d14]
lea eax, [esi + 2]
push edx
sub edx, 1
fild dword [esp]
fmulp st(2)
mov dword [esp], eax
fild dword [esp]
add esp, 4
fmulp st(2)
fxch st(1)
fldcw word [ebp - 0xbc6]
frndint
fldcw word [ebp - 0xbbe]
fldcw word [ebp - 0xbc0]
fistp dword [ebp - 0xbc4]
fldcw word [ebp - 0xbbe]
mov eax, dword [ebp - 0xbc4]
cmp edx, eax
jle 0x9f1218
mov edx, eax
mov edi, dword [ebx + 0x21d1c]
fild dword [edi + edx*4]
fmulp st(1)
fild dword [ebx + 0x21d08]
fdivp st(1)
fldcw word [ebp - 0xbc0]
fistp dword [ebp - 0xbc4]
fldcw word [ebp - 0xbbe]
mov eax, dword [ebp - 0xbc4]
cmp eax, 0xff
jle 0x9f124f
mov eax, 0xff
mov byte [esi + ebp - 0x78], al
add esi, 3
cmp esi, 0x64
jne 0x9f10b0
mov edx, dword [ebp + 8]
mov eax, dword [ebx + 0xdc00]
mov esi, dword [edx + 0x54]
test esi, esi
je 0x9f1272
sub eax, 2
mov ecx, dword [ebp + 8]
mov edi, dword [ecx + 0x88]
test edi, edi
jne 0x9f1611
mov byte [ebp + eax - 0xbba], 0x49
lea esi, [eax + 4]
mov byte [ebp + eax - 0xbb9], 0x6e
mov byte [ebp + eax - 0xbb8], 0x66
mov byte [ebp + eax - 0xbb7], 0x6f
lea ecx, [ebp - 0xbba]
add ecx, esi
mov byte [ecx], 0
mov byte [ecx + 1], 0
mov byte [ecx + 2], 0
mov byte [ecx + 3], 0xf
mov edi, dword [ebp + 8]
mov ecx, dword [edi + 0x138]
lea edi, [esi + ebp - 0xbb6]
mov edx, ecx
mov eax, ecx
sar edx, 0x18
mov byte [edi], dl
mov edx, ecx
sar eax, 0x10
sar edx, 8
mov byte [edi + 1], al
mov byte [edi + 2], dl
mov byte [edi + 3], cl
mov eax, dword [ebp - 0xbd0]
lea edi, [esi + ebp - 0xbb2]
sar eax, 0x18
mov byte [edi], al
mov edx, dword [ebp - 0xbd0]
sar edx, 0x10
mov byte [edi + 1], dl
mov ecx, dword [ebp - 0xbd0]
lea edx, [ebp - 0x7a]
sar ecx, 8
mov byte [edi + 2], cl
movzx eax, byte [ebp - 0xbd0]
lea ecx, [esi + ebp - 0xbae]
mov byte [edi + 3], al
lea edi, [esi + 0x70]
mov dword [esp + 4], edx
mov dword [esp + 8], 0x64
mov dword [esp], ecx
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp + 8]
mov dword [ebp - 0xbd4], edi
mov edx, dword [eax + 0x54]
test edx, edx
jne 0x9f1775
mov ebx, dword [ebp - 0xbd4]
xor eax, eax
test ebx, ebx
jle 0x9f158a
movzx eax, byte [ebp - 0xbba]
lea edi, [esi + 0x71]
mov ebx, 2
lea ecx, [esi + 0x6f]
and ecx, 7
cmp ebx, edi
movzx eax, word [eax*4 + 0xaebe70]
je 0x9f1587
test ecx, ecx
je 0x9f14a2
cmp ecx, 1
je 0x9f147a
cmp ecx, 2
je 0x9f145a
cmp ecx, 3
je 0x9f143a
cmp ecx, 4
nop
lea esi, [esi]
je 0x9f141a
cmp ecx, 5
je 0x9f13fa
cmp ecx, 6
je 0x9f13da
movzx ecx, byte [ebp - 0xbb9]
movzx esi, ax
mov bl, 3
xor ecx, esi
movzx edx, cl
movzx eax, word [edx*4 + 0xaebe70]
sar esi, 8
xor eax, esi
movzx edx, byte [ebx + ebp - 0xbbb]
movzx esi, ax
add ebx, 1
xor edx, esi
movzx eax, dl
movzx eax, word [eax*4 + 0xaebe70]
sar esi, 8
xor eax, esi
movzx ecx, ax
movzx eax, byte [ebx + ebp - 0xbbb]
add ebx, 1
xor eax, ecx
movzx esi, al
movzx eax, word [esi*4 + 0xaebe70]
sar ecx, 8
xor eax, ecx
movzx edx, ax
movzx eax, byte [ebx + ebp - 0xbbb]
add ebx, 1
xor eax, edx
movzx ecx, al
movzx eax, word [ecx*4 + 0xaebe70]
sar edx, 8
xor eax, edx
movzx ecx, byte [ebx + ebp - 0xbbb]
movzx esi, ax
add ebx, 1
xor ecx, esi
movzx edx, cl
movzx eax, word [edx*4 + 0xaebe70]
sar esi, 8
xor eax, esi
movzx edx, byte [ebx + ebp - 0xbbb]
movzx esi, ax
add ebx, 1
xor edx, esi
movzx eax, dl
movzx eax, word [eax*4 + 0xaebe70]
sar esi, 8
xor eax, esi
movzx ecx, ax
movzx eax, byte [ebx + ebp - 0xbbb]
add ebx, 1
xor eax, ecx
movzx esi, al
movzx eax, word [esi*4 + 0xaebe70]
sar ecx, 8
xor eax, ecx
cmp ebx, edi
je 0x9f1587
movzx ecx, byte [ebx + ebp - 0xbbb]
movzx edx, ax
xor ecx, edx
movzx esi, cl
movzx ecx, byte [ebx + ebp - 0xbba]
movzx eax, word [esi*4 + 0xaebe70]
sar edx, 8
xor eax, edx
movzx edx, byte [ebx + ebp - 0xbb9]
movzx eax, ax
xor ecx, eax
movzx esi, cl
sar eax, 8
xor ax, word [esi*4 + 0xaebe70]
movzx esi, ax
xor edx, esi
movzx ecx, dl
movzx edx, byte [ebx + ebp - 0xbb8]
sar esi, 8
xor si, word [ecx*4 + 0xaebe70]
movzx eax, si
xor edx, eax
movzx ecx, dl
movzx edx, byte [ebx + ebp - 0xbb7]
sar eax, 8
xor ax, word [ecx*4 + 0xaebe70]
movzx ecx, ax
xor edx, ecx
movzx esi, dl
movzx edx, byte [ebx + ebp - 0xbb6]
sar ecx, 8
xor cx, word [esi*4 + 0xaebe70]
movzx eax, cx
movzx ecx, byte [ebx + ebp - 0xbb5]
xor edx, eax
movzx esi, dl
sar eax, 8
xor ax, word [esi*4 + 0xaebe70]
movzx esi, ax
xor ecx, esi
movzx edx, cl
movzx ecx, byte [ebx + ebp - 0xbb4]
add ebx, 8
sar esi, 8
xor si, word [edx*4 + 0xaebe70]
movzx eax, si
xor ecx, eax
movzx edx, cl
sar eax, 8
xor ax, word [edx*4 + 0xaebe70]
cmp ebx, edi
jne 0x9f14a2
movzx eax, ax
mov ecx, dword [ebp - 0xbcc]
lea edi, [ebp - 0xbba]
mov edx, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
add edi, dword [ebp - 0xbd4]
mov dword [esp + 0xc], ecx
mov dword [esp + 4], edx
mov dword [esp + 8], edi
mov dword [esp], esi
lea esi, [ebp - 0xbba]
mov dword [esp + 0x10], eax
call fcn.009f0520
mov ebx, dword [ebp - 0xbcc]
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.msvcrt.dll_fseek
mov ecx, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov dword [esp + 8], 1
mov dword [esp + 0xc], ecx
mov edx, dword [edi + 0x134]
mov dword [esp], esi
mov dword [esp + 4], edx
call sub.msvcrt.dll_fwrite
xor edx, edx
sub eax, 1
je 0x9f0e94
jmp 0x9f0e8f
lea esi, [eax + 4]
mov byte [ebp + eax - 0xbba], 0x58
mov byte [ebp + eax - 0xbb9], 0x69
mov byte [ebp + eax - 0xbb8], 0x6e
mov byte [ebp + eax - 0xbb7], 0x67
jmp 0x9f12a6
mov byte [ebp - 0x79], 2
mov ecx, 0x3fc
mov byte [ebp - 0x78], 5
lea edi, [ebp - 0x77]
mov byte [ebp - 0x77], 7
lea esi, [esi]
mov esi, 0x51eb851f
mov eax, ecx
imul esi
mov eax, ecx
sar eax, 0x1f
sar edx, 5
sub edx, eax
mov byte [edi + 1], dl
lea edx, [ecx + 0xff]
mov eax, edx
mov dword [ebp - 0xbd8], edx
imul esi
sar dword [ebp - 0xbd8], 0x1f
sar edx, 5
sub edx, dword [ebp - 0xbd8]
mov byte [edi + 2], dl
lea edx, [ecx + 0x1fe]
mov eax, edx
mov dword [ebp - 0xbd8], edx
imul esi
sar dword [ebp - 0xbd8], 0x1f
sar edx, 5
sub edx, dword [ebp - 0xbd8]
mov byte [edi + 3], dl
lea edx, [ecx + 0x2fd]
mov eax, edx
mov dword [ebp - 0xbd8], edx
imul esi
sar dword [ebp - 0xbd8], 0x1f
sar edx, 5
sub edx, dword [ebp - 0xbd8]
mov byte [edi + 4], dl
lea edx, [ecx + 0x3fc]
mov eax, edx
mov dword [ebp - 0xbd8], edx
imul esi
sar dword [ebp - 0xbd8], 0x1f
sar edx, 5
sub edx, dword [ebp - 0xbd8]
mov byte [edi + 5], dl
lea edx, [ecx + 0x4fb]
mov eax, edx
mov dword [ebp - 0xbd8], edx
imul esi
sar dword [ebp - 0xbd8], 0x1f
sar edx, 5
sub edx, dword [ebp - 0xbd8]
mov byte [edi + 6], dl
lea edx, [ecx + 0x5fa]
mov eax, edx
mov dword [ebp - 0xbd8], edx
imul esi
sar dword [ebp - 0xbd8], 0x1f
sar edx, 5
sub edx, dword [ebp - 0xbd8]
mov byte [edi + 7], dl
lea edx, [ecx + 0x6f9]
add ecx, 0x7f8
mov eax, edx
mov dword [ebp - 0xbd8], edx
imul esi
sar dword [ebp - 0xbd8], 0x1f
sar edx, 5
sub edx, dword [ebp - 0xbd8]
mov byte [edi + 8], dl
add edi, 8
cmp ecx, 0x639c
jne 0x9f1650
jmp 0x9f125f
lea eax, [ebp - 0xbba]
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.009d7e70
jmp 0x9f1350
mov eax, dword [eax + 0xc]
mov dword [esp + 4], edx
mov dword [esp], edi
mov dword [esp + 8], eax
call fcn.009d3b70
mov edi, dword [ebp + 8]
mov edx, dword [edi + 0x118]
mov ecx, eax
shl ecx, 4
jmp 0x9f1027
movzx edx, byte [ebp - 0xbb8]
or esi, 0xa
jmp 0x9f103a