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

Disassembly:
sub esp, 0x644
mov eax, dword [0x58c780]
xor eax, esp
mov dword [esp + 0x640], eax
push ebp
mov ebp, dword [esp + 0x64c]
push edi
push 0x10
push 0x42
mov dword [esp + 0x18], ebp
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edi, eax
test edi, edi
jne 0x4ed270
push str.OpenFastFile_:
push 2
call fcn.004f0290
add esp, 8
pop edi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x640]
xor ecx, esp
call fcn.004f3b35
add esp, 0x644
ret
mov dword [edi], 0
mov dword [edi + 4], 0xffffffff
mov eax, dword [0x58c6ac]
push ebx
push esi
test al, 2
je 0x4ed3df
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0x8000080
push 3
push 0
push 1
push accept
push ebp
call esi
mov dword [edi + 4], eax
cmp eax, 0xffffffff
jne 0x4ed382
push 0xc31a58
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x4ed39d
lea eax, [esp + 0x248]
push eax
lea ecx, [esp + 0x450]
push ecx
lea edx, [esp + 0x4c]
push edx
lea eax, [esp + 0x38]
push eax
push ebp
call fcn.004f4e51
mov al, byte [esp + 0x58]
add esp, 0x14
cmp al, 0x5c
je 0x4ed32e
cmp al, 0x2f
je 0x4ed32e
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0xc308a0
lea ecx, [esp + 0x148]
push ecx
call ebx
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x148]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea ecx, [esp + 0x144]
push ecx
lea edx, [esp + 0x48]
push edx
call ebx
jmp 0x4ed334
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [esp + 0x248]
push eax
lea ecx, [esp + 0x450]
push ecx
lea edx, [esp + 0x4c]
push edx
lea eax, [esp + 0x150]
push 0xc31a58
push eax
call fcn.004f4c3f
add esp, 0x14
push 0
push 0x8000080
push 3
push 0
push 1
push accept
lea ecx, [esp + 0x15c]
push ecx
call esi
mov dword [edi + 4], eax
cmp eax, 0xffffffff
je 0x4ed3a3
mov eax, edi
mov ecx, dword [esp + 0x650]
pop esi
pop ebx
pop edi
pop ebp
xor ecx, esp
call fcn.004f3b35
add esp, 0x644
ret
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [0x58c6ac]
mov edx, eax
not edx
test dl, 1
je 0x4ed3e5
push ebp
push 0x55fab8
push 2
call fcn.004f0290
mov esi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
add esp, 0xc
push edi
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x4ed384
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyA]
test al, 1
je 0x4ed382
push ebp
xor esi, esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
dec eax
mov dword [esp + 0x20], eax
inc esi
cmp esi, eax
mov dword [esp + 0x24], esi
jge 0x4ed3b1
mov al, byte [esi + ebp]
cmp al, 0x5c
je 0x4ed40f
cmp al, 0x2f
jne 0x4ed531
lea eax, [esi + ebp + 1]
push eax
lea ecx, [esp + 0x550]
push ecx
call ebx
push ebp
lea edx, [esp + 0x34c]
push edx
call ebx
push str..bin
lea eax, [esp + esi + 0x34c]
push eax
call ebx
push 0
push 0x8000080
push 3
push 0
push 1
push accept
lea ecx, [esp + 0x360]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [edi + 4], eax
cmp eax, 0xffffffff
jne 0x4ed52b
push 0xc31a58
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x4ed52b
lea edx, [esp + 0x248]
push edx
lea eax, [esp + 0x450]
push eax
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0x38]
push edx
lea eax, [esp + 0x358]
push eax
call fcn.004f4e51
mov al, byte [esp + 0x58]
add esp, 0x14
cmp al, 0x5c
je 0x4ed4de
cmp al, 0x2f
je 0x4ed4de
push 0xc308a0
lea ecx, [esp + 0x148]
push ecx
call ebx
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x148]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea ecx, [esp + 0x144]
push ecx
lea edx, [esp + 0x48]
push edx
call ebx
lea eax, [esp + 0x248]
push eax
lea ecx, [esp + 0x450]
push ecx
lea edx, [esp + 0x4c]
push edx
lea eax, [esp + 0x150]
push 0xc31a58
push eax
call fcn.004f4c3f
add esp, 0x14
push 0
push 0x8000080
push 3
push 0
push 1
push accept
lea ecx, [esp + 0x15c]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [edi + 4], eax
cmp dword [edi + 4], 0xffffffff
jne 0x4ed557
movsx edx, byte [esi + ebp]
push edx
call fcn.004f7f6d
add esp, 4
test eax, eax
je 0x4ed543
inc esi
inc esi
cmp esi, dword [esp + 0x20]
mov dword [esp + 0x24], esi
jl 0x4ed400
jmp 0x4ed3b1
cmp esi, dword [esp + 0x20]
jge 0x4ed3b1
mov edx, dword [edi + 4]
push 0
lea eax, [esp + 0x2c]
push eax
push 0x14
lea ecx, [esp + 0x3c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4ed8f7
mov eax, 8
xor ecx, ecx
jmp 0x4ed590
mov edx, dword [esp + ecx + 0x30]
cmp edx, dword [ecx + str.ESC_ARC2]
jne 0x4ed8f7
sub eax, 4
add ecx, 4
cmp eax, 4
jae 0x4ed590
mov ecx, dword [esp + 0x38]
mov ebp, dword [esp + 0x3c]
xor ecx, 0x65ac9365
lea edx, [ecx + ecx]
xor edx, ecx
mov eax, ecx
shr eax, 1
xor eax, ecx
add edx, edx
shr eax, 3
add edx, edx
add edx, edx
xor eax, edx
xor eax, ecx
xor ebp, eax
xor eax, 0x65ac9365
lea ecx, [eax + eax]
xor ecx, eax
mov esi, eax
shr esi, 1
xor esi, eax
add ecx, ecx
mov dword [esp + 0x14], ebp
add ecx, ecx
shr esi, 3
add ecx, ecx
lea ebp, [ebp + ebp*2]
xor esi, ecx
xor esi, eax
mov eax, dword [esp + 0x40]
add ebp, ebp
add ebp, ebp
push ebp
xor eax, esi
push 0
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ebx, eax
test ebx, ebx
je 0x4ed7fc
mov eax, dword [edi + 4]
push 0
lea edx, [esp + 0x2c]
push edx
push ebp
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4ed836
mov ecx, dword [esp + 0x10]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ecx, dword [esp + 0x10]
push 0
lea edx, [esp + 0x2c]
push edx
mov edx, dword [edi + 4]
push ecx
push eax
push edx
mov dword [esp + 0x30], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4ed885
shr ebp, 2
mov eax, ebx
test ebp, ebp
je 0x4ed6a8
jmp 0x4ed680
xor esi, 0x65ac9365
lea edx, [esi + esi]
xor edx, esi
mov ecx, esi
shr ecx, 1
add edx, edx
xor ecx, esi
add edx, edx
shr ecx, 3
add edx, edx
xor ecx, edx
xor esi, ecx
xor dword [eax], esi
dec ebp
add eax, 4
test ebp, ebp
jne 0x4ed680
mov eax, dword [esp + 0x14]
add eax, 0xffffffff
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], eax
jns 0x4ed714
mov ebp, dword [esp + 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push ebp
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebp
call esi
mov ebp, dword [sym.imp.KERNEL32.dll_GlobalFree]
push eax
call ebp
push ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebx
call esi
push eax
call ebp
mov eax, dword [edi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x24]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov ebp, dword [esp + 0x18]
mov eax, dword [esp + 0x20]
jmp 0x4ed3f7
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov ebp, dword [esp + 0x1c]
add eax, ecx
cdq
sub eax, edx
mov esi, eax
sar esi, 1
lea edx, [esi + esi*2]
mov eax, dword [ebx + edx*4]
add eax, ebp
push eax
lea eax, [esp + 0x550]
push eax
call fcn.004f5d75
add esp, 8
test eax, eax
jge 0x4ed749
dec esi
mov dword [esp + 0x14], esi
jmp 0x4ed750
jle 0x4ed75f
inc esi
mov dword [esp + 0x10], esi
mov ecx, dword [esp + 0x14]
cmp dword [esp + 0x10], ecx
jle 0x4ed710
jmp 0x4ed6c1
mov edx, dword [esp + 0x14]
cmp dword [esp + 0x10], edx
jg 0x4ed6c1
lea edx, [esi + esi*2]
mov ecx, dword [ebx + edx*4 + 4]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
lea eax, [ebx + edx*4]
mov dword [edi + 8], ecx
mov edx, dword [eax + 8]
push ebp
mov dword [edi + 0xc], edx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebp
call esi
mov ebp, dword [sym.imp.KERNEL32.dll_GlobalFree]
push eax
call ebp
push ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebx
call esi
push eax
call ebp
mov eax, dword [edi + 8]
mov ecx, dword [edi + 4]
push 0
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4ed8ec
mov edx, dword [esp + 0x18]
push edx
push 0x55fa78
push 2
call fcn.004f0290
mov eax, dword [edi + 4]
add esp, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call esi
push eax
call ebp
xor eax, eax
jmp 0x4ed384
push str.OpenFastFile_:
push 2
call fcn.004f0290
mov ecx, dword [edi + 4]
add esp, 8
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push edi
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x4ed384
mov edx, dword [esp + 0x18]
push edx
push 0x55fa4c
push 2
call fcn.004f0290
mov esi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
add esp, 0xc
push ebx
call esi
mov ebp, dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push eax
call ebp
push ebx
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalFree]
push eax
call ebx
mov eax, dword [edi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call esi
push eax
call ebp
push edi
call esi
push eax
call ebx
xor eax, eax
jmp 0x4ed384
mov ecx, dword [esp + 0x18]
push ecx
push 0x55fa4c
push 2
call fcn.004f0290
mov edx, dword [esp + 0x28]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
add esp, 0xc
push edx
call esi
mov ebp, dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push eax
call ebp
mov eax, dword [esp + 0x1c]
push eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebx
call esi
push eax
call ebp
push ebx
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalFree]
push eax
call ebx
mov ecx, dword [edi + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call esi
push eax
call ebp
push edi
call esi
push eax
call ebx
xor eax, eax
jmp 0x4ed384
mov dword [edi], 1
jmp 0x4ed382
push ebp
push 0x55fa4c
push 2
call fcn.004f0290
mov ecx, dword [edi + 4]
add esp, 0xc
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push edi
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x4ed384