Function at 0x4b5e30
Capabilities:
Check if file exists
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56fb95
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push esi
push edi
mov eax, dword [0x5e8024]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov esi, dword [ebp + 8]
test esi, esi
js 0x4b659c
cmp esi, dword [ebx + 0x7c]
jge 0x4b659c
shl esi, 5
add esi, dword [ebx + 0x78]
mov dword [ebp + 8], esi
cmp byte [esi + 0x1c], 0
je 0x4b5e93
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [esi + 4]
mov dword [ebp - 0x2c], eax
add eax, 0xfffffffc
cmp eax, 6
ja case.0x4b5ea8.6
movzx eax, byte [eax + 0x4b65c4]
jmp dword [eax*4 + 0x4b65bc]
mov ecx, dword [ebx + 0x70]
cmp dword [ecx - 0xc], 0
jne 0x4b5ebb
mov ecx, dword [ebx + 0x68]
add ecx, 0xfffffff0
call fcn.00409540
add eax, 0x10
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], 1
lea eax, [esi + 0x18]
push eax
lea edx, [ebp - 0x18]
mov dword [ebp - 0x30], eax
lea ecx, [ebp - 0x14]
call fcn.004980a0
add esp, 4
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x24]
mov eax, dword [esi + 0xc]
push dword [ebp - 0x18]
mov dword [ebp - 0x20], eax
call fcn.00416070
mov byte [ebp - 4], 3
lea edx, [ebp - 0x24]
lea ecx, [ebp - 0x28]
call fcn.0049ac00
mov byte [ebp - 4], 4
push dword [eax]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, 1
sete byte [ebp - 0xd]
mov byte [ebp - 4], 3
or edi, 0xffffffff
mov edx, dword [ebp - 0x28]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4b5f3d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
mov eax, edi
mov edx, dword [ebp - 0x24]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4b5f5b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0xd], 0
jne 0x4b5fd3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
mov edx, eax
lea ecx, [ebp + 0xc]
add ebx, 0xd4
call fcn.0049df40
add esp, 4
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x14]
mov eax, dword [eax]
mov esi, dword [ebp - 0x14]
mov dword [ebp + 8], eax
call fcn.0049a5c0
test al, al
je 0x4b5f96
add esi, 8
push dword [ebp + 8]
push esi
push 0x104
push ebx
call fcn.004a45d0
add esp, 0x10
mov byte [ebp - 4], 2
mov eax, edi
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4b5fc6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, 0xe
or esi, 0xffffffff
jmp 0x4b6549
mov ecx, dword [ebp - 0x18]
push 0
push dword [ebp - 0x20]
call fcn.004c2fb0
add esp, 8
test al, al
jne 0x4b60d3
mov ecx, dword [ebp + 0xc]
mov ecx, dword [ecx + 4]
test ecx, ecx
je 0x4b6009
mov eax, dword [ecx]
push 0
push dword [ebp - 0x20]
push dword [ebp - 0x18]
call dword [eax]
test eax, eax
jne 0x4b60d3
cmp byte [0x5ee690], 0
je 0x4b60c6
call fcn.00409d30
mov ecx, eax
test ecx, ecx
je 0x4b65a8
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp + 8], eax
mov byte [ebp - 4], 0xb
lea ecx, [ebp + 8]
push 0x26
push str.Not_enough_disk_space_to_extract_file:
call fcn.00419d30
push dword [ebp - 0x30]
lea edx, [ebp - 0x18]
lea ecx, [ebp + 0xc]
call fcn.004980a0
add esp, 4
mov byte [ebp - 4], 0xc
mov edx, dword [eax]
test edx, edx
je 0x4b607c
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4b6063
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp + 8]
call fcn.00419d30
lea eax, [ebp + 8]
mov ecx, 0x5ee658
push eax
call fcn.004cd8e0
mov byte [ebp - 4], 0xb
mov eax, edi
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4b60a8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
mov eax, edi
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4b60c6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, 0xa
or esi, 0xffffffff
jmp 0x4b6549
mov eax, dword [ebp + 0xc]
mov edi, dword [eax]
test edi, edi
je 0x4b6116
mov eax, dword [edi]
mov ecx, edi
push 0
push dword [esi + 0xc]
call dword [eax + 0x1c]
mov eax, dword [edi]
lea ecx, [ebp - 0x14]
mov eax, dword [eax + 0x14]
mov dword [ebp - 0x28], eax
mov eax, dword [esi]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp + 0xc], eax
call fcn.0049a5c0
test al, al
mov eax, dword [ebp + 0xc]
je 0x4b610d
add eax, 8
push dword [ebp - 0x30]
mov ecx, edi
push eax
call dword [ebp - 0x28]
cmp dword [ebp - 0x2c], 0xc
jne 0x4b612b
lea eax, [ebp - 0x14]
lea ecx, [ebx + 0xa4]
push eax
call fcn.00496e80
lea eax, [ebx + 0xb0]
xor dl, dl
push eax
lea ecx, [ebp - 0x14]
call fcn.0049a9e0
add esp, 4
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x3c], 0x5935fc
mov dword [ebp - 0x38], eax
mov byte [ebp - 4], 0x10
cmp eax, 0xffffffff
jne 0x4b62c1
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
push ecx
mov edx, eax
lea ecx, [ebp + 0xc]
add ebx, 0xd4
call fcn.0049df40
add esp, 4
mov byte [ebp - 4], 0x11
lea ecx, [ebp - 0x14]
mov eax, dword [eax]
mov esi, dword [ebp - 0x14]
mov dword [ebp + 8], eax
call fcn.0049a5c0
test al, al
je 0x4b61ab
add esi, 8
push dword [ebp + 8]
push esi
push 0x104
push ebx
call fcn.004a45d0
add esp, 0x10
mov byte [ebp - 4], 0x10
or esi, 0xffffffff
mov edx, dword [ebp + 0xc]
mov eax, esi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4b61de
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [0x5ee690], 0
je 0x4b6353
call fcn.00409d30
mov ecx, eax
test ecx, ecx
je 0x4b65b2
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp + 8], eax
mov byte [ebp - 4], 0x15
lea ecx, [ebp + 8]
push 0x17
push str.Failed_to_extract_file:
call fcn.00419d30
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4b623d
mov edx, eax
lea ebx, [edx + 2]
mov cx, word [edx]
add edx, 2
test cx, cx
jne 0x4b6224
sub edx, ebx
lea ecx, [ebp + 8]
sar edx, 1
push edx
push eax
call fcn.00419d30
push 7
push str._Error:
lea ecx, [ebp + 8]
call fcn.00419d30
push ecx
call edi
mov edx, eax
lea ecx, [ebp + 0xc]
call fcn.0049df40
add esp, 4
mov byte [ebp - 4], 0x16
mov edx, dword [eax]
test edx, edx
je 0x4b6289
mov ecx, edx
lea edi, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4b6270
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp + 8]
call fcn.00419d30
lea eax, [ebp + 8]
mov ecx, 0x5ee658
push eax
call fcn.004cd8e0
mov byte [ebp - 4], 0x15
mov eax, esi
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4b62b5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x10
mov edx, dword [ebp + 8]
jmp 0x4b633c
mov ecx, dword [esi + 0x10]
xor eax, eax
add ecx, dword [ebx + 0x58]
push 0
adc eax, dword [ebx + 0x5c]
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x40]
push eax
push ecx
push dword [ebx + 0x88]
mov dword [ebp - 0x44], ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4b635d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
lea esi, [ebx + 0x60]
mov edx, eax
lea ecx, [ebp + 0xc]
add ebx, 0xd4
call fcn.0049df40
add esp, 4
mov byte [ebp - 4], 0x1a
mov ecx, esi
mov eax, dword [eax]
mov edi, dword [esi]
mov dword [ebp + 8], eax
call fcn.0049a5c0
test al, al
je 0x4b6320
add edi, 8
push dword [ebp + 8]
push edi
push 0x103
push ebx
call fcn.004a45d0
add esp, 0x10
mov byte [ebp - 4], 0x10
or esi, 0xffffffff
mov edx, dword [ebp + 0xc]
mov eax, esi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4b6353
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, 2
jmp 0x4b6529
mov dword [ebp - 0x24], 0
mov byte [ebp - 4], 0x1c
lea ecx, [ebp - 0x24]
push 0x10000
call fcn.004b89e0
mov dword [ebx + 0xd0], 0
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0xc]
mov esi, dword [ebp - 0x24]
shr eax, 1
and eax, 0xffffff01
mov dword [ebp + 0xc], ecx
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x28], 0
nop dword [eax]
test edi, edi
je 0x4b63b8
mov eax, dword [edi]
mov ecx, edi
mov eax, dword [eax + 0x24]
call eax
test al, al
jne 0x4b64dd
mov ecx, dword [ebp + 0xc]
mov eax, ecx
cmp ecx, 0x10000
mov ecx, 0x10000
push 0
cmova eax, ecx
lea ecx, [ebp - 0x1c]
push ecx
push eax
push esi
push dword [ebx + 0x88]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4b6442
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x4b6442
cmp byte [ebp - 0x30], 0
je 0x4b63fd
push eax
lea ecx, [ebx + 0xc8]
push esi
call fcn.004d5b60
mov eax, dword [ebp - 0x1c]
push 0
lea ecx, [ebp - 0x1c]
push ecx
push eax
push esi
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4b6442
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x4b6442
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0x28]
sub ecx, eax
add edx, eax
mov dword [ebp + 0xc], ecx
mov dword [ebp - 0x28], edx
test edi, edi
je 0x4b643a
mov eax, dword [edi]
mov ecx, edi
push 0
push edx
call dword [eax + 0x20]
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jne 0x4b63a0
mov eax, dword [ebp + 8]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [eax + 0x1c], 1
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x4b6461
push eax
call edi
xor eax, eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x2c]
cmp eax, 8
je 0x4b648a
test eax, eax
je 0x4b648a
cmp eax, 1
je 0x4b648a
cmp eax, 0xb
je 0x4b648a
cmp eax, 0xd
je 0x4b648a
cmp eax, 0xe
je 0x4b648a
cmp eax, 0xf
jne 0x4b6510
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x34], 0x5935fc
mov dword [ebp - 0x30], eax
mov byte [ebp - 4], 0x1d
mov ecx, dword [ebx + 0x100]
cmp ecx, dword [ebx + 0x104]
je 0x4b64e4
mov dword [ecx], 0x5935fc
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x30], 0
mov dword [ecx + 4], eax
add dword [ebx + 0x100], 8
jmp 0x4b64f4
mov edi, 0xf
jmp 0x4b6512
lea eax, [ebp - 0x34]
push eax
push ecx
lea ecx, [ebx + 0xfc]
call fcn.004b8e90
mov byte [ebp - 4], 0x1c
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x34], 0x5935fc
test eax, eax
je 0x4b6510
push eax
call edi
mov dword [ebp - 0x30], 0
xor edi, edi
mov byte [ebp - 4], 0x10
push esi
call fcn.0052e812
add esp, 4
mov dword [ebp - 0x24], 0
or esi, 0xffffffff
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x3c], 0x5935fc
test eax, eax
je 0x4b6549
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x38], 0
mov byte [ebp - 4], 1
mov eax, esi
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4b6567
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], esi
dec esi
test esi, esi
jg 0x4b6586
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push 1
push 0xc000008c
call fcn.00412050
push 0x80004005
call fcn.00409a00
push 0x80004005
call fcn.00409a00
scasd eax, dword es:[edi]
pop esi
dec ebx
add byte [eax + 0x4b5e], bh
add byte [ecx], al
add dword [ecx], eax
add byte [eax], al
int3