Function at 0x100ed870
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 0x1017845d
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x101cfdb0]
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 0x100ed90c
cmp ebx, 0x102199fc
je 0x100ed8c7
cmp dword [ebx + 0x18], 0x10
lea eax, [ebx + 4]
jb 0x100ed8bb
mov eax, dword [eax]
push ecx
push eax
mov ecx, 0x102199fc
call fcn.10046d30
cmp dword [ebx + 0x18], 0x10
lea edi, [ebx + 4]
mov eax, edi
jb 0x100ed8d4
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 0x100ed913
cmp dword [ebx + 0x18], 0x10
jb 0x100ed8fc
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 0x100edae4
mov ecx, dword [ebx + 0x14]
mov eax, 0x7fffffff
sub eax, ecx
cmp eax, 4
jb 0x100edb02
cmp dword [ebx + 0x18], 0x10
mov eax, edi
jb 0x100ed930
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.10047c30
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 0x100ed97e
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 0x100eda95
push eax
call fcn.10117010
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 0x100ed9b4
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.101163d0
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.100ee0f0
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 0x100eda87
cmp dword [ebx + 0x18], 0x10
jb 0x100eda77
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.10136a40
add esp, 4
lea ecx, [ebp - 0x2c]
call fcn.100432e0
mov eax, dword [ebp - 0x14]
cmp eax, 0x10
jb 0x100edabb
inc eax
push eax
push dword [ebp - 0x28]
call fcn.100479d0
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.100479d0
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.101163c0
mov esp, ebp
pop ebp
ret 4
call fcn.10043330
int3