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

Disassembly:
sub esp, 0x230
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x34]
mov esi, ecx
mov ecx, dword [esp + 0x244]
push eax
xor ebx, ebx
push ecx
mov dword [esp + 0x18], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, dword [esp + 0x34]
mov edi, eax
cmp dword [esi + 0x20], ebx
mov dword [esp + 0x30], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], ebp
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
je 0x56b558
mov edx, dword [esp + 0x248]
push 0x104
add edx, 0x48
push edx
lea eax, [esp + 0x40]
push eax
call dword [0x5d2618]
lea ecx, [esp + 0x44]
add esp, 0xc
test ecx, ecx
mov word [esp + 0x23e], bx
je 0x56b53e
mov edx, ecx
push edx
call dword [0x5d2620]
add esp, 4
mov ecx, dword [esi + 0x20]
lea eax, [esp + 0x38]
push eax
call fcn.00597b50
mov ecx, dword [esi + 0x20]
mov edx, dword [ecx]
push 0xaaaaaa1
call dword [edx + 0xc]
push 0x40000
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ebx, eax
test ebx, ebx
push 0
je 0x56b73c
push 0
push 0
call fcn.0058c670
push 0
push 0
push 0
mov dword [esp + 0x38], eax
call fcn.0058c670
test ebp, ebp
mov dword [esp + 0x20], eax
jl 0x56b6fd
jg 0x56b5b0
test edi, edi
jbe 0x56b6fd
jmp 0x56b5b0
mov ebp, dword [esp + 0x34]
mov edi, dword [esp + 0x30]
mov eax, dword [esp + 0x10]
test eax, eax
jl 0x56b6fd
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
sub edi, edx
mov eax, ebp
sbb eax, ecx
js 0x56b5df
jg 0x56b5d6
cmp edi, 0x40000
jbe 0x56b5df
mov edi, 0x40000
xor ebp, ebp
jmp 0x56b5e1
mov ebp, eax
mov ecx, dword [esp + 0x244]
push 0
lea eax, [esp + 0x18]
push eax
push edi
push ebx
push ecx
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x56b6e2
mov eax, dword [esp + 0x14]
xor ecx, ecx
cmp edi, eax
jne 0x56b6e2
cmp ebp, ecx
jne 0x56b6e2
mov edx, dword [esp + 0x2c]
push edi
push ebx
push edx
call fcn.0058c670
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x14]
sub edx, eax
sbb ecx, 0
push 0
mov dword [esp + 0x2c], ecx
lea ecx, [esp + 0x18]
push ecx
push edi
mov dword [esp + 0x30], edx
mov edx, dword [esi + 0xc]
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x20]
push eax
push ebx
push ecx
call fcn.0058c670
mov ecx, dword [esi + 0x20]
test ecx, ecx
mov dword [esp + 0x20], eax
je 0x56b69c
call fcn.005979b0
cmp eax, 0x8004e00c
mov dword [esp + 0x10], eax
je 0x56b6fd
mov ecx, dword [esi + 0x20]
mov eax, dword [esp + 0x14]
mov edx, dword [ecx]
push 0
push eax
call dword [edx + 0x10]
test eax, eax
mov dword [esp + 0x10], eax
jl 0x56b6fd
mov eax, dword [esp + 0x14]
mov edx, dword [esi + 0x18]
mov ebp, dword [esi + 0x1c]
mov edi, dword [esp + 0x18]
xor ecx, ecx
add edx, eax
adc ebp, ecx
add edi, eax
mov eax, dword [esp + 0x28]
mov dword [esi + 0x18], edx
mov edx, dword [esp + 0x1c]
adc edx, ecx
test eax, eax
mov dword [esi + 0x1c], ebp
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], edx
jg 0x56b5a8
jl 0x56b6fd
mov eax, dword [esp + 0x24]
test eax, eax
ja 0x56b5a8
jmp 0x56b6fd
push 0
push str.NoCompressFile
push 0xaaaaaaaa
mov ecx, esi
call fcn.0056a380
mov dword [esp + 0x10], 0x8004e008
mov eax, dword [esp + 0x248]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov edi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
mov dword [eax + 0x24], ecx
mov ecx, dword [esp + 0x2c]
mov dword [eax + 0x28], edx
mov edx, dword [esp + 0x20]
push ebx
mov dword [eax + 0x20], ecx
mov dword [eax + 0x1c], edx
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebx
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x56b755
push str.NoCompressFile
push 0xaaaaaaa3
mov ecx, esi
call fcn.0056a380
mov dword [esp + 0x10], 0x8007000e
mov ecx, dword [esi + 0x20]
test ecx, ecx
pop edi
pop esi
pop ebp
pop ebx
je 0x56b767
mov eax, dword [ecx]
push 0
call dword [eax + 0xc]
mov eax, dword [esp]
add esp, 0x230
ret 8