Function at 0x4bfe88
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 0x20
add esp, 0xfffff004
push eax
dec eax
jne 0x4bfe91
mov eax, dword [ebp - 4]
add esp, 0xfffffe18
push ebx
push esi
push edi
mov eax, 0x4e800c
call fcn.0049c448
mov word [ebp - 0x24], 8
lea edx, [ebp - 4]
push edx
call fcn.0049a704
pop ecx
inc dword [ebp - 0x18]
mov word [ebp - 0x24], 0x14
mov byte [ebp - 0xd5], 0
mov byte [ebp - 0xd6], 0
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
mov ecx, dword [ebp + 0x10]
push ecx
call sub.KERNEL32.DLL_CreateFileA
mov esi, eax
test esi, esi
jne 0x4bff1d
xor eax, eax
lea edx, [ebp - 4]
push eax
dec dword [ebp - 0x18]
push 2
push edx
call fcn.0049b1d0
add esp, 8
pop eax
mov edx, dword [ebp - 0x34]
mov dword fs:[0], edx
jmp 0x4c086b
mov dword [ebp - 0x64], 4
mov dword [ebp - 0x68], 8
mov edi, 2
lea edx, [ebp - 0x78]
mov eax, edi
lea ecx, [ebp - 0xa1]
mov byte [ebp - 0xa1], al
push 0
push edx
push 1
push ecx
push esi
call sub.KERNEL32.DLL_WriteFile
mov eax, dword [ebp - 0x78]
xor edx, edx
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x84], edx
mov cl, byte [ebp - 0x64]
lea eax, [ebp - 0x78]
mov byte [ebp - 0xa1], cl
push 0
push eax
lea edx, [ebp - 0xa1]
push 1
push edx
push esi
call sub.KERNEL32.DLL_WriteFile
mov eax, dword [ebp - 0x78]
xor edx, edx
add dword [ebp - 0x88], eax
adc dword [ebp - 0x84], edx
lea eax, [ebp - 0x78]
mov cl, byte [ebp - 0x68]
lea edx, [ebp - 0xa1]
mov byte [ebp - 0xa1], cl
push 0
push eax
push 1
push edx
push esi
call sub.KERNEL32.DLL_WriteFile
mov eax, dword [ebp - 0x78]
xor edx, edx
add dword [ebp - 0x88], eax
adc dword [ebp - 0x84], edx
push esi
push edi
lea edi, [ebp - 0x1dc]
mov eax, edi
mov esi, str.XY_COMPRESSFILES_1.0
mov ecx, 5
lea edx, [ebp - 0x1dc]
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
pop edi
pop esi
push edx
call fcn.0049c15c
pop ecx
mov dword [ebp - 0x70], eax
lea ecx, [ebp - 0x78]
push 0
push ecx
lea edx, [ebp - 0x70]
mov eax, dword [ebp - 0x64]
push eax
push edx
push esi
call sub.KERNEL32.DLL_WriteFile
mov eax, dword [ebp - 0x78]
xor edx, edx
add dword [ebp - 0x88], eax
adc dword [ebp - 0x84], edx
lea ecx, [ebp - 0x78]
push 0
push ecx
mov eax, dword [ebp - 0x70]
lea edx, [ebp - 0x1dc]
push eax
push edx
push esi
call sub.KERNEL32.DLL_WriteFile
mov eax, dword [ebp - 0x78]
xor edx, edx
add dword [ebp - 0x88], eax
adc dword [ebp - 0x84], edx
lea ecx, [ebp - 0x78]
mov dword [ebp - 0xa0], 0
mov dword [ebp - 0x9c], 0
push 0
push ecx
mov eax, dword [ebp - 0x68]
lea edx, [ebp - 0xa0]
push eax
push edx
push esi
call sub.KERNEL32.DLL_WriteFile
mov ecx, dword [ebp - 0x88]
mov dword [ebp - 0xa0], ecx
mov ecx, dword [ebp - 0x84]
mov dword [ebp - 0x9c], ecx
mov eax, dword [ebp - 0x78]
xor edx, edx
add dword [ebp - 0x88], eax
adc dword [ebp - 0x84], edx
push 0xc
call fcn.0049b6f8
pop ecx
mov dword [ebp - 8], eax
test eax, eax
je 0x4c00b0
mov word [ebp - 0x24], 0x2c
mov edx, dword [ebp - 8]
push edx
call fcn.004129a8
pop ecx
mov word [ebp - 0x24], 0x20
mov ecx, dword [ebp - 8]
jmp 0x4c00b3
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x38], ecx
push 0xc
call fcn.0049b6f8
pop ecx
mov dword [ebp - 0xc], eax
test eax, eax
je 0x4c00e0
mov word [ebp - 0x24], 0x44
mov edx, dword [ebp - 0xc]
push edx
call fcn.004129a8
pop ecx
mov word [ebp - 0x24], 0x38
mov eax, dword [ebp - 0xc]
jmp 0x4c00e3
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x3c], eax
mov edx, dword [ebp - 0x3c]
push edx
mov ecx, dword [ebp - 0x38]
push ecx
mov eax, dword [ebp + 0x18]
push eax
push 0
push 0
mov edx, dword [ebp + 0x14]
push edx
push 0
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 8]
push eax
call fcn.00494cf0
add esp, 0x20
mov edx, dword [ebp - 0x38]
push edx
call fcn.00412d20
pop ecx
mov dword [ebp - 0x70], eax
lea ecx, [ebp - 0x78]
push 0
push ecx
lea edx, [ebp - 0x70]
mov eax, dword [ebp - 0x64]
push eax
push edx
push esi
call sub.KERNEL32.DLL_WriteFile
xor edx, edx
mov eax, dword [ebp - 0x78]
add dword [ebp - 0x88], eax
adc dword [ebp - 0x84], edx
xor ecx, ecx
mov dword [ebp - 0xcc], 0
mov dword [ebp - 0xc8], 0
mov dword [ebp - 0xd4], 0
mov dword [ebp - 0xd0], 0
mov dword [ebp - 0x6c], ecx
mov eax, dword [ebp - 0x6c]
cmp eax, dword [ebp - 0x70]
jge 0x4c0206
mov edx, dword [ebp - 0x6c]
push edx
mov ecx, dword [ebp - 0x38]
push ecx
call fcn.00412b08
add esp, 8
mov ebx, eax
lea eax, [ebp - 0x48]
push 0
push 0
push eax
push 0
push 0
push 0
push ebx
mov edx, dword [ebp + 8]
mov ecx, dword [edx + 4]
push ecx
call fcn.00492b74
add esp, 0x20
test al, al
je 0x4c01f7
mov eax, dword [ebp - 0x48]
mov edx, dword [eax]
push edx
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 4]
push eax
call fcn.004930bc
add esp, 8
test al, al
jne 0x4c01f7
mov edx, dword [ebp - 0x48]
mov ecx, dword [edx + 0x20]
push ecx
mov eax, dword [ebp - 0x48]
mov edx, dword [eax + 0x1c]
push edx
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
push eax
call fcn.00413004
add esp, 0xc
add eax, dword [ebp - 0xd4]
adc edx, dword [ebp - 0xd0]
mov dword [ebp - 0xd4], eax
mov dword [ebp - 0xd0], edx
inc dword [ebp - 0x6c]
mov edx, dword [ebp - 0x6c]
cmp edx, dword [ebp - 0x70]
jl 0x4c0176
push 0x10
call fcn.0049b6f8
pop ecx
mov dword [ebp - 0x10], eax
test eax, eax
je 0x4c0230
mov word [ebp - 0x24], 0x5c
mov edx, dword [ebp - 0x10]
push edx
call fcn.00414704
pop ecx
mov word [ebp - 0x24], 0x50
mov ecx, dword [ebp - 0x10]
jmp 0x4c0233
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x40], ecx
xor eax, eax
mov dword [ebp - 0x6c], eax
jmp 0x4c0700
mov edx, dword [ebp - 0x88]
mov dword [ebp - 0x90], edx
mov edx, dword [ebp - 0x84]
mov dword [ebp - 0x8c], edx
mov dword [ebp - 0x98], 0
mov dword [ebp - 0x94], 0
mov eax, dword [ebp - 0x6c]
push eax
mov edx, dword [ebp - 0x38]
push edx
call fcn.00412b08
add esp, 8
mov ebx, eax
lea eax, [ebp - 0x48]
lea edx, [ebp - 0x4c]
push 0
push 0
push eax
push 0
push 0
push edx
push ebx
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 4]
push eax
call fcn.00492b74
add esp, 0x20
test al, al
je 0x4c068e
mov edx, dword [ebp - 0x48]
mov ecx, dword [edx]
push ecx
mov eax, dword [ebp + 8]
mov edx, dword [eax + 4]
push edx
call fcn.004930bc
add esp, 8
test al, al
jne 0x4c068e
cmp dword [ebp - 0x4c], 0
je 0x4c0342
mov ecx, dword [ebp - 0x4c]
push ecx
call fcn.0049c15c
mov ebx, eax
mov eax, dword [ebp - 0x48]
add eax, 0x2c
pop ecx
push eax
call fcn.0049c15c
pop ecx
add ebx, eax
add ebx, 2
push ebx
call fcn.0049b898
pop ecx
mov dword [ebp - 0x50], eax
mov ecx, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x50]
push esi
push edi
mov edi, ecx
xor eax, eax
or ecx, 0xffffffff
mov esi, edx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
xchg edi, esi
shr ecx, 2
mov eax, edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
push 0x4e7f0e
mov eax, dword [ebp - 0x50]
push eax
call fcn.0049c120
add esp, 8
mov edx, dword [ebp - 0x48]
add edx, 0x2c
push edx
mov ecx, dword [ebp - 0x50]
push ecx
call fcn.0049c120
add esp, 8
jmp 0x4c0388
mov eax, dword [ebp - 0x48]
add eax, 0x2c
push eax
call fcn.0049c15c
pop ecx
inc eax
push eax
call fcn.0049b898
pop ecx
mov dword [ebp - 0x50], eax
mov ecx, dword [ebp - 0x50]
mov edx, dword [ebp - 0x48]
push esi
push edi
mov esi, ecx
add edx, 0x2c
xor eax, eax
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
xchg edi, esi
shr ecx, 2
mov eax, edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
mov dword [ebp - 0xbc], 0
mov dword [ebp - 0xb8], 0
push 0
push 0x80
push 3
push 0
push 3
push closesocket
mov eax, dword [ebp - 0x50]
push eax
call sub.KERNEL32.DLL_CreateFileA
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0
je 0x4c0684
lea edx, [ebp - 0x7c]
push edx
mov ecx, dword [ebp - 0x44]
push ecx
call sub.KERNEL32.DLL_GetFileSize
mov dword [ebp - 0x80], eax
mov eax, dword [ebp - 0x80]
push eax
mov edx, dword [ebp - 0x7c]
push edx
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
push eax
call fcn.00413004
add esp, 0xc
mov dword [ebp - 0xb4], eax
mov dword [ebp - 0xb0], edx
mov dword [ebp - 0xc4], eax
mov dword [ebp - 0xc0], edx
jmp 0x4c0665
cmp dword [ebp - 0xb0], 0
jne 0x4c041a
cmp dword [ebp - 0xb4], 0x10000
jbe 0x4c0423
mov ebx, 0x10000
jmp 0x4c042b
mov eax, dword [ebp - 0xb4]
mov ebx, eax
push 0
lea eax, [ebp - 0x74]
push eax
push ebx
lea edx, [ebp - 0x101dc]
push edx
mov ecx, dword [ebp - 0x44]
push ecx
call sub.KERNEL32.DLL_ReadFile
mov eax, ebx
cdq
sub dword [ebp - 0xb4], eax
sbb dword [ebp - 0xb0], edx
cmp ebx, 0x10000
jne 0x4c0464
mov word [ebp - 0xaa], 0
jmp 0x4c046b
mov word [ebp - 0xaa], bx
push 0
lea ecx, [ebp - 0x78]
push ecx
push edi
lea eax, [ebp - 0xaa]
push eax
push esi
call sub.KERNEL32.DLL_WriteFile
mov eax, dword [ebp - 0x78]
xor edx, edx
add dword [ebp - 0x88], eax
adc dword [ebp - 0x84], edx
lea ecx, [ebp - 0x201ec]
push ecx
push ebx
lea eax, [ebp - 0x101dc]
push eax
lea edx, [ebp - 4]
push edx
call fcn.0049ad6c
add esp, 0x10
mov dword [ebp - 0xa8], eax
cmp dword [ebp - 0xa8], 0
jne 0x4c0526
mov cx, word [ebp - 0xaa]
lea eax, [ebp - 0x78]
mov word [ebp - 0xac], cx
push 0
push eax
push edi
lea edx, [ebp - 0xac]
push edx
push esi
call sub.KERNEL32.DLL_WriteFile
xor edx, edx
mov eax, dword [ebp - 0x78]
add dword [ebp - 0x88], eax
adc dword [ebp - 0x84], edx
lea ecx, [ebp - 0x78]
push 0
push ecx
push ebx
lea eax, [ebp - 0x101dc]
push eax
push esi
call sub.KERNEL32.DLL_WriteFile
mov eax, dword [ebp - 0x78]
xor edx, edx
add dword [ebp - 0x88], eax
adc dword [ebp - 0x84], edx
lea eax, [edi + ebx]
add eax, edi
cdq
add dword [ebp - 0x98], eax
adc dword [ebp - 0x94], edx
jmp 0x4c059b
mov cx, word [ebp - 0xa8]
lea eax, [ebp - 0x78]
mov word [ebp - 0xac], cx
push 0
push eax
push edi
lea edx, [ebp - 0xac]
push edx
push esi
call sub.KERNEL32.DLL_WriteFile
mov eax, dword [ebp - 0x78]
xor edx, edx
add dword [ebp - 0x88], eax
adc dword [ebp - 0x84], edx
lea ecx, [ebp - 0x78]
push 0
push ecx
mov eax, dword [ebp - 0xa8]
lea edx, [ebp - 0x201ec]
push eax
push edx
push esi
call sub.KERNEL32.DLL_WriteFile
mov eax, dword [ebp - 0x78]
xor edx, edx
add dword [ebp - 0x88], eax
adc dword [ebp - 0x84], edx
mov eax, dword [ebp - 0xa8]
add eax, edi
add eax, edi
cdq
add dword [ebp - 0x98], eax
adc dword [ebp - 0x94], edx
mov eax, ebx
cdq
add eax, dword [ebp - 0xbc]
adc edx, dword [ebp - 0xb8]
mov dword [ebp - 0xbc], eax
mov dword [ebp - 0xb8], edx
mov eax, ebx
cdq
add eax, dword [ebp - 0xcc]
adc edx, dword [ebp - 0xc8]
mov dword [ebp - 0xcc], eax
mov dword [ebp - 0xc8], edx
cmp word [ebp + 0x1e], 0
je 0x4c0665
lea ecx, [ebp - 0xd6]
lea eax, [ebp - 0xd5]
push ecx
push eax
push dword [ebp - 0xd0]
push dword [ebp - 0xd4]
push dword [ebp - 0xc8]
push dword [ebp - 0xcc]
push dword [ebp - 0xc0]
push dword [ebp - 0xc4]
push dword [ebp - 0xb8]
push dword [ebp - 0xbc]
mov ecx, dword [ebp + 0x10]
push ecx
mov eax, dword [ebp - 0x50]
push eax
mov edx, dword [ebp + 0xc]
push edx
mov ecx, dword [ebp + 0x20]
push ecx
call dword [ebp + 0x1c]
add esp, 0x38
xor eax, eax
mov al, byte [ebp - 0xd6]
cmp eax, 1
sbb edx, edx
neg edx
and byte [ebp - 0xd5], dl
cmp byte [ebp - 0xd5], 0
je 0x4c0658
push 0x1f4
call sub.KERNEL32.DLL_Sleep
cmp byte [ebp - 0xd5], 0
jne 0x4c05dc
cmp dword [ebp - 0xb0], 0
jne 0x4c0675
cmp dword [ebp - 0xb4], 0
ja 0x4c0407
mov ecx, dword [ebp - 0x44]
push ecx
call sub.KERNEL32.DLL_CloseHandle
mov eax, dword [ebp - 0x50]
push eax
call fcn.0049b6d4
pop ecx
mov edx, dword [ebp - 0x6c]
push edx
mov ecx, dword [ebp - 0x3c]
push ecx
call fcn.00412b08
add esp, 8
mov ebx, eax
lea eax, [ebp - 0x60]
push eax
push ebx
mov edx, dword [ebp + 8]
mov ecx, dword [edx + 4]
push ecx
call fcn.00492164
add esp, 0xc
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0
je 0x4c06fd
lea eax, [ebp - 0x60]
lea edx, [ebp - 0x5c]
push eax
push edx
push dword [ebp - 0x94]
push dword [ebp - 0x98]
push dword [ebp - 0x8c]
push dword [ebp - 0x90]
mov edx, dword [ebp + 8]
push edx
call fcn.004bf8d4
add esp, 0x1c
mov ecx, dword [ebp - 0x60]
push ecx
mov eax, dword [ebp - 0x5c]
push eax
mov edx, dword [ebp - 0x40]
push edx
call fcn.0041474c
add esp, 0xc
inc dword [ebp - 0x6c]
cmp byte [ebp - 0xd6], 0
jne 0x4c0715
mov ecx, dword [ebp - 0x6c]
cmp ecx, dword [ebp - 0x70]
jl 0x4c0240
mov eax, dword [ebp - 0x38]
push eax
mov edx, dword [ebp + 8]
mov ecx, dword [edx + 4]
push ecx
call fcn.00492c50
add esp, 8
mov eax, dword [ebp - 0x3c]
push eax
mov edx, dword [ebp + 8]
mov ecx, dword [edx + 4]
push ecx
call fcn.00492c50
add esp, 8
push 3
mov eax, dword [ebp - 0x38]
push eax
call fcn.00412d84
add esp, 8
push 3
mov edx, dword [ebp - 0x3c]
push edx
call fcn.00412d84
add esp, 8
lea ecx, [ebp - 0x80]
push ecx
lea eax, [ebp - 0x7c]
push eax
push dword [ebp - 0x9c]
push dword [ebp - 0xa0]
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
push eax
call fcn.0041303c
add esp, 0x14
lea edx, [ebp - 0x7c]
push 0
push edx
mov ecx, dword [ebp - 0x80]
push ecx
push esi
call sub.KERNEL32.DLL_SetFilePointer
lea eax, [ebp - 0x78]
push 0
push eax
lea ecx, [ebp - 0x88]
mov edx, dword [ebp - 0x68]
push edx
push ecx
push esi
call sub.KERNEL32.DLL_WriteFile
mov eax, dword [ebp - 0x40]
lea edx, [ebp - 0x54]
push eax
push edx
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
push eax
call fcn.00414174
add esp, 0xc
mov dword [ebp - 0x58], eax
lea edx, [ebp - 0x58]
push edx
lea ecx, [ebp - 0x54]
push ecx
lea eax, [ebp - 4]
push eax
mov edx, dword [ebp + 8]
mov ecx, dword [edx]
push ecx
call fcn.004142c0
add esp, 0x10
push 3
mov eax, dword [ebp - 0x40]
push eax
call fcn.00414cd8
add esp, 8
lea edx, [ebp - 0x80]
push edx
lea ecx, [ebp - 0x7c]
push ecx
push dword [ebp - 0x84]
push dword [ebp - 0x88]
mov edx, dword [ebp + 8]
mov ecx, dword [edx]
push ecx
call fcn.0041303c
add esp, 0x14
lea eax, [ebp - 0x7c]
push 0
push eax
mov edx, dword [ebp - 0x80]
push edx
push esi
call sub.KERNEL32.DLL_SetFilePointer
lea ecx, [ebp - 0x78]
push 0
push ecx
lea edx, [ebp - 0x58]
mov eax, dword [ebp - 0x64]
push eax
push edx
push esi
call sub.KERNEL32.DLL_WriteFile
push 0
lea ecx, [ebp - 0x78]
push ecx
mov eax, dword [ebp - 0x58]
push eax
mov edx, dword [ebp - 0x54]
push edx
push esi
call sub.KERNEL32.DLL_WriteFile
mov ecx, dword [ebp - 0x54]
push ecx
call fcn.0049b6d4
pop ecx
push esi
call sub.KERNEL32.DLL_CloseHandle
mov eax, dword [ebp - 0x70]
lea edx, [ebp - 4]
push eax
dec dword [ebp - 0x18]
push 2
push edx
call fcn.0049b1d0
add esp, 8
pop eax
mov edx, dword [ebp - 0x34]
mov dword fs:[0], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret