Function at 0x100f7730
Capabilities:
Encode data using xor
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10182b2d
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x101dadb0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x3c], ebx
mov ecx, dword [ebx + 0x14]
test ecx, ecx
je 0x100f77cc
cmp ebx, 0x102249fc
je 0x100f7787
cmp dword [ebx + 0x18], 0x10
lea eax, [ebx + 4]
jb 0x100f777b
mov eax, dword [eax]
push ecx
push eax
mov ecx, 0x102249fc
call fcn.10048350
cmp dword [ebx + 0x18], 0x10
lea edi, [ebx + 4]
mov eax, edi
jb 0x100f7794
mov eax, dword [edi]
push 0
push 0x80
push 3
push 0
push 0
push connect
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x100f77d3
cmp dword [ebx + 0x18], 0x10
jb 0x100f77bc
mov edi, dword [edi]
push 0
push str.N3TableBase___Cant_open_file_read__File_Handle_error_n
push edi
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
jmp 0x100f79a4
mov ecx, dword [ebx + 0x14]
mov eax, 0x7fffffff
sub eax, ecx
cmp eax, 4
jb 0x100f79c2
cmp dword [ebx + 0x18], 0x10
mov eax, edi
jb 0x100f77f0
mov eax, dword [edi]
push 4
push str..tmp
push ecx
push eax
push ecx
push dword [ebp - 0x3c]
lea ecx, [ebp - 0x2c]
call fcn.10049270
lea eax, [ebp - 0x40]
mov dword [ebp - 4], 0
push eax
push esi
mov dword [ebp - 0x40], 0
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x30], eax
test eax, eax
jne 0x100f783e
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
xor esi, esi
jmp 0x100f7955
push eax
call fcn.10121110
mov edi, dword [ebp - 0x30]
lea ecx, [ebp - 0x38]
add esp, 4
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x38], 0
push 0
push ecx
push edi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x34]
mov ebx, 0x816
xor esi, esi
mov al, byte [esi + eax]
mov edx, ebx
movzx ecx, al
add cx, bx
shr edx, 8
xor dl, al
movzx ecx, cx
mov eax, 0x6081
imul ecx, eax
mov eax, 0x1608
add cx, ax
mov eax, dword [ebp - 0x34]
movzx ebx, cx
mov byte [esi + eax], dl
inc esi
cmp esi, edi
jb 0x100f7874
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
cmovae eax, dword [ebp - 0x28]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push eax
call edi
mov ebx, dword [ebp - 0x34]
mov esi, eax
push 0
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x30]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.101204d0
add esp, 4
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], 0x10
cmovae eax, dword [ebp - 0x28]
push 0
push 0x80
push 3
push 0
push 0
push connect
push eax
call edi
mov esi, eax
push esi
call fcn.100f7fb0
mov ebx, eax
push esi
mov dword [ebp - 0x30], ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
mov ebx, dword [ebp - 0x3c]
lea edi, [ebx + 4]
jne 0x100f7947
cmp dword [ebx + 0x18], 0x10
jb 0x100f7937
mov edi, dword [edi]
push 0
push str.N3TableBase___incorrect_table_n
push edi
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
mov esi, dword [ebp - 0x30]
cmovae eax, dword [ebp - 0x28]
push eax
call fcn.10140b60
add esp, 4
lea ecx, [ebp - 0x2c]
call fcn.100448c0
mov eax, dword [ebp - 0x14]
cmp eax, 0x10
jb 0x100f797b
inc eax
push eax
push dword [ebp - 0x28]
call fcn.10049010
add esp, 8
mov ecx, dword [ebp - 0x2c]
push 8
push ecx
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
mov dword [ebp - 0x2c], 0
call fcn.10049010
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.101204c0
mov esp, ebp
pop ebp
ret 4
call fcn.10044910
int3