Function at 0x404a8b
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
xor ebx, ebx
push 0x100218
push ebx
mov dword [ebp - 8], ebx
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push 0xd
mov esi, eax
pop ecx
xor eax, eax
push ebx
push ebx
push dword [ebp + 0xc]
lea edi, [ebp - 0x48]
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x14], esi
push dword [ebp + 8]
rep stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0xc]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
push eax
lea eax, [ebp - 1]
push 1
push eax
push dword [ebp + 8]
call edi
test eax, eax
jne 0x404ae7
push 0xfffffffffffffffd
pop esi
jmp 0x404c76
cmp byte [ebp - 1], 1
jne 0x404bd1
push 0x38
lea eax, [ebp - 0x4c]
push str.1.1.3
push eax
call fcn.00402415
add esp, 0xc
lea eax, [ebp + 0xc]
push ebx
push eax
lea eax, [ebp - 0x10]
push 4
push eax
push dword [ebp + 8]
call edi
test eax, eax
je 0x404bbb
cmp dword [ebp + 0xc], 4
jne 0x404bbb
cmp dword [ebp - 0x10], ebx
je 0x404bc2
lea eax, [ebp + 0xc]
push ebx
push eax
push dword [ebp - 0x10]
push esi
push dword [ebp + 8]
call edi
test eax, eax
je 0x404bbb
mov eax, dword [ebp - 0x10]
cmp dword [ebp + 0xc], eax
jne 0x404bbb
mov dword [ebp - 0x48], eax
lea eax, [esi + 0x80218]
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x4c], esi
lea eax, [ebp - 0x4c]
mov esi, 0x80000
push 2
push eax
mov dword [ebp - 0x3c], esi
call fcn.0040242c
pop ecx
cmp eax, 0xfffffffe
pop ecx
je 0x404bbb
cmp eax, 0xfffffffb
je 0x404bbb
cmp eax, 0xfffffffd
je 0x404bbb
cmp eax, 2
je 0x404bbb
sub esi, dword [ebp - 0x3c]
lea eax, [ebp + 0xc]
push ebx
push eax
mov eax, dword [ebp - 0x14]
push esi
add eax, 0x80218
push eax
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x404bb2
mov eax, dword [ebp + 0xc]
cmp eax, esi
jne 0x404bb2
add dword [ebp - 8], eax
mov esi, dword [ebp - 0x14]
jmp 0x404b04
mov dword [ebp - 8], 0xfffffffe
jmp 0x404bc2
mov dword [ebp - 8], 0xfffffffd
lea eax, [ebp - 0x4c]
push eax
call fcn.004022ed
pop ecx
jmp 0x404c73
cmp byte [ebp - 1], bl
jne 0x404c4e
lea eax, [ebp - 0xc]
push ebx
push eax
lea eax, [ebp + 0xc]
push 4
push eax
push dword [ebp + 8]
call edi
test eax, eax
jne 0x404bf9
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push 0xfffffffffffffffd
pop eax
jmp 0x404c81
cmp dword [ebp + 0xc], ebx
jle 0x404c73
mov eax, 0x10000
cmp dword [ebp + 0xc], eax
jge 0x404c0b
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 0xc]
push ebx
push ecx
push eax
push esi
push dword [ebp + 8]
call edi
test eax, eax
je 0x404c3c
lea eax, [ebp - 0x10]
push ebx
push eax
push dword [ebp - 0xc]
push esi
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x404c45
mov eax, dword [ebp - 0xc]
add dword [ebp - 8], eax
sub dword [ebp + 0xc], eax
jmp 0x404bf9
mov dword [ebp - 8], 0xfffffffd
jmp 0x404c73
mov dword [ebp - 8], 0xfffffffe
jmp 0x404c73
movsx eax, byte [ebp - 1]
push eax
push str.unknown_compression:__d_n
push 0x4121e0
call dword [sym.imp.USER32.dll_wsprintfA]
push ebx
call fcn.00407fad
add esp, 0x10
mov dword [ebp - 8], 0xfffffffa
mov esi, dword [ebp - 8]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret