Function at 0x4c7880
Capabilities:
Read file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x404c]
mov eax, 0x404c
call fcn.0051dcc0
push 0xffffffffffffffff
push 0x53ecc5
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x572844]
xor eax, ebp
mov dword [ebp + 0x4048], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x1c], ebx
mov esi, dword [ebp + 0x4054]
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x18], esi
call fcn.00481580
mov dword [ebp - 4], 0
lea eax, [ebp + 0x3048]
push 0x800
push eax
lea eax, [ebp + 0x2048]
mov byte [ebx + 0x303c], 0
push eax
mov ecx, 0x5aa610
call fcn.004cdc50
lea eax, [ebp + 0x2048]
push eax
call fcn.004837b0
test al, al
jne 0x4c7917
xor eax, eax
mov word [ebp + 0x2048], ax
lea eax, [ebp + 0x3048]
push eax
call fcn.004837b0
test al, al
jne 0x4c7930
xor eax, eax
mov word [ebp + 0x3048], ax
xor eax, eax
cmp word [esi + 0x950a], 0
mov word [ebp + 0x1048], ax
lea eax, [esi + 0x950a]
je 0x4c795b
push 0x800
push eax
lea eax, [ebp + 0x2048]
push eax
call fcn.004b0360
cmp word [esi + 0xa50a], 0
lea eax, [esi + 0xa50a]
je 0x4c797d
push 0x800
push eax
lea eax, [ebp + 0x3048]
push eax
call fcn.004b0360
cmp word [esi + 0xb50a], 0
lea eax, [esi + 0xb50a]
je 0x4c799f
push 0x800
push eax
lea eax, [ebp + 0x1048]
push eax
call fcn.004b0360
cmp word [ebp + 0x3048], 0x2a
jne 0x4c79bc
cmp word [ebp + 0x304a], 0
jne 0x4c79bc
xor eax, eax
mov word [ebp + 0x3048], ax
push 6
push str.WinCon
lea edi, [esi + 0x1010]
push edi
call fcn.00495850
push eax
call fcn.004b4460
test eax, eax
jne 0x4c79eb
xor ecx, ecx
mov word [ebp + 0x3048], ax
mov word [ebp + 0x1048], cx
jmp 0x4c79f9
mov ax, word [ebp + 0x3048]
mov cx, word [ebp + 0x1048]
xor edx, edx
lea esi, [ebx + 0x1038]
mov word [esi], dx
cmp word [edi], dx
je 0x4c7fef
cmp word [ebp + 0x2048], dx
jne 0x4c7a2f
test ax, ax
jne 0x4c7a2f
test cx, cx
jne 0x4c7a2f
mov eax, dword [ebp - 0x18]
cmp byte [eax + 0xc50a], dl
je 0x4c7fef
push edi
call fcn.004837b0
test al, al
je 0x4c7fef
push 0x800
push edi
lea eax, [ebx + 0x2038]
push eax
call fcn.004b0360
push 0x800
push esi
push str.Rar_SF
mov dword [ebx + 0x3038], edi
call fcn.004ec860
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x4c7fcb
push 0x54599c
push edi
call fcn.004ed1c0
mov edi, eax
test edi, edi
sete al
mov byte [ebx + 0x303c], al
test edi, edi
je 0x4c7fac
push edi
push 0x400
lea eax, [ebp + 0xc48]
push 1
push eax
call fcn.00529db5
push edi
mov esi, eax
call fcn.00526918
add esi, 0xfffffffc
add esp, 0x14
xor eax, eax
test esi, esi
jle 0x4c7af1
jmp 0x4c7ac0
cmp byte [ebp + eax + 0xc48], 0x55
jne 0x4c7aec
cmp byte [ebp + eax + 0xc49], 0x50
jne 0x4c7aec
cmp byte [ebp + eax + 0xc4a], 0x58
jne 0x4c7aec
cmp byte [ebp + eax + 0xc4b], 0x30
je 0x4c7fac
inc eax
cmp eax, esi
jl 0x4c7ac0
mov esi, dword [ebp - 0x18]
mov ecx, ebx
mov edi, dword [ebp - 0x1c]
add esi, 0x1010
push edi
push esi
call fcn.004c8600
test al, al
je 0x4c7fef
push edi
call fcn.00526918
push 0x10000
mov dword [ebp - 0x3c], 0
push 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov byte [ebp - 0x30], 0
mov dword [ebp - 0x3c], 0x10000
call fcn.00525bbb
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x4c7b5a
mov ecx, 0x5b68fc
call fcn.0047b030
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x38], 0x10000
mov byte [ebp - 4], 1
mov ecx, ebx
push 0x10000
push edi
push esi
call fcn.004c92c0
cmp word [ebp + 0x2048], 0
mov dword [ebp - 0x1c], eax
mov byte [ebp - 0xe], 0
mov byte [ebp - 0xd], 0
jne 0x4c7ba3
cmp word [ebp + 0x3048], 0
jne 0x4c7ba3
cmp word [ebp + 0x1048], 0
je 0x4c7e6b
push 0
lea esi, [ebx + 0x1038]
push esi
call dword [sym.imp.KERNEL32.dll_BeginUpdateResourceW]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x4c7f80
push 3
push 0
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov ecx, eax
mov dword [ebp - 0x28], ecx
test ecx, ecx
je 0x4c7e39
mov ax, word [ebp + 0x2048]
mov esi, dword [ebp - 0x14]
test ax, ax
je 0x4c7c23
push esi
push 0x4c8820
push 3
push ecx
call dword [sym.imp.KERNEL32.dll_EnumResourceNamesW]
push esi
push 0x4c8820
push 0xe
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_EnumResourceNamesW]
push 0x64
lea eax, [ebp + 0x2048]
mov ecx, ebx
push eax
push esi
call fcn.004c8100
mov cl, al
mov ax, word [ebp + 0x2048]
mov byte [ebp - 0xe], cl
jmp 0x4c7c26
mov cl, byte [ebp - 0xe]
cmp word [ebp + 0x3048], 0
jne 0x4c7c3e
cmp word [ebp + 0x1048], 0
je 0x4c7e30
test ax, ax
je 0x4c7c4b
test cl, cl
je 0x4c7e30
push 0x553374
lea eax, [ebp + 0x3048]
push eax
call fcn.004939b0
test al, al
jne 0x4c7c75
push 0x553374
lea eax, [ebp + 0x1048]
push eax
call fcn.004939b0
test al, al
je 0x4c7c86
push esi
push 0x4c8820
push 2
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_EnumResourceNamesW]
push esi
push 0x4c8820
push 0x55337c
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_EnumResourceNamesW]
cmp word [ebp + 0x3048], 0
je 0x4c7e12
push 0x553374
lea eax, [ebp + 0x3048]
push eax
call fcn.004939b0
test al, al
lea eax, [ebp + 0x3048]
je 0x4c7e04
push 0x54599c
push eax
call fcn.004ed1c0
mov esi, eax
test esi, esi
sete al
mov byte [ebx + 0x303c], al
test esi, esi
jne 0x4c7cef
mov esi, dword [ebp - 0x14]
mov byte [ebp - 0xd], 0
jmp 0x4c7e12
push esi
call fcn.0052b3a2
add esp, 4
cmp eax, 0x42
jne 0x4c7d3c
push esi
call fcn.0052b3a2
add esp, 4
cmp eax, 0x4d
jne 0x4c7d3c
push 0
push 2
push esi
call fcn.0052a1cb
push esi
push 1
lea eax, [ebp - 0x20]
push 4
push eax
call fcn.00529db5
mov eax, dword [ebp - 0x20]
sub eax, 0xe
push eax
mov dword [ebp - 0x20], eax
call fcn.00525bb0
add esp, 0x20
mov dword [ebp - 0x24], eax
test eax, eax
jne 0x4c7d51
push esi
call fcn.00526918
mov esi, dword [ebp - 0x14]
add esp, 4
mov byte [ebp - 0xd], 0
jmp 0x4c7e12
push 0
push 0xe
push esi
call fcn.0052a1cb
push esi
push dword [ebp - 0x20]
push 1
push dword [ebp - 0x24]
call fcn.00529db5
add esp, 0x1c
cmp eax, dword [ebp - 0x20]
je 0x4c7dcb
push str.BMP__PNG
push 0x686
call fcn.004a9c90
push eax
lea eax, [ebp + 0xc48]
push 0x200
push eax
call fcn.00402c90
add esp, 0x10
push 0x66
call fcn.004a9c90
push 0x10
push eax
lea eax, [ebp + 0xc48]
push eax
push dword [0x57a0c8]
call fcn.004edd90
push dword [ebp - 0x24]
call fcn.00525b95
push esi
call fcn.00526918
mov esi, dword [ebp - 0x14]
add esp, 8
mov byte [ebp - 0xd], 0
jmp 0x4c7e12
push esi
call fcn.00526918
add esp, 4
push dword [ebp - 0x20]
push dword [ebp - 0x24]
push 0x400
push 0x65
push 2
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_UpdateResourceW]
push dword [ebp - 0x24]
mov esi, eax
call fcn.00525b95
add esp, 4
test esi, esi
mov esi, dword [ebp - 0x14]
setne byte [ebp - 0xd]
jmp 0x4c7e12
push 0x65
push eax
push esi
mov ecx, ebx
call fcn.004c8390
mov byte [ebp - 0xd], al
cmp word [ebp + 0x1048], 0
je 0x4c7e30
push 0x66
lea eax, [ebp + 0x1048]
mov ecx, ebx
push eax
push esi
call fcn.004c8390
or byte [ebp - 0xd], al
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 0
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_EndUpdateResourceW]
test eax, eax
je 0x4c7f80
cmp word [ebp + 0x3048], 0
mov al, byte [ebp - 0xd]
je 0x4c7e61
test al, al
je 0x4c7f80
cmp byte [ebp - 0xe], 0
jne 0x4c7edf
test al, al
jne 0x4c7edf
mov eax, dword [ebp - 0x18]
cmp byte [eax + 0xc50a], 0
jne 0x4c7ee2
lea esi, [ebx + 0x1038]
cmp dword [ebp - 0x1c], 0
je 0x4c7ec5
push 0x10000
push edi
push esi
mov ecx, ebx
call fcn.004c92c0
test eax, eax
jne 0x4c7ec5
push 0x553384
push esi
call fcn.004ed1c0
mov esi, eax
test esi, esi
je 0x4c7ec5
push 2
push 0
push esi
call fcn.0052a1cb
push esi
push dword [ebp - 0x1c]
push 1
push edi
call fcn.00526d9e
push esi
call fcn.00526918
add esp, 0x20
mov byte [ebp - 4], 0
test edi, edi
je 0x4c7fcb
push edi
call fcn.00525b95
add esp, 4
jmp 0x4c7fcb
mov eax, dword [ebp - 0x18]
cmp byte [eax + 0xc50a], 0
lea esi, [ebx + 0x1038]
je 0x4c7ef9
push esi
mov ecx, ebx
call fcn.004c86b0
push 0
lea eax, [ebp]
mov dword [ebp + 0x1010], 0
push eax
push esi
mov dword [ebp + 0x1014], 0
mov dword [ebp + 0x1018], 0
mov dword [ebp + 0x101c], 0
mov dword [ebp + 0x1020], 0
mov dword [ebp + 0x1024], 0
call fcn.00485370
test al, al
je 0x4c7f93
mov ecx, dword [ebp - 0x1c]
xor eax, eax
add ecx, dword [ebp + 0x1000]
adc eax, dword [ebp + 0x1004]
mov dword [ebp - 0x28], eax
jne 0x4c7f63
cmp ecx, 0x200000
jbe 0x4c7f93
push 0x200000
push 0x5a0
call fcn.004a9c90
push eax
push 0x59701a
call fcn.004f3130
add esp, 0xc
mov byte [ebp - 4], 0
test edi, edi
je 0x4c7fef
push edi
call fcn.00525b95
add esp, 4
jmp 0x4c7fef
mov eax, dword [ebp - 0x18]
push 0x800
push esi
add eax, 0x1010
push eax
call fcn.004b0360
jmp 0x4c7e7d
push 0x5f5
call fcn.004a9c90
push eax
call fcn.004f27d0
add esp, 4
mov ecx, 0x5b68fc
push 1
call fcn.0047b6f0
cmp word [ebx + 0x1038], 0
lea ecx, [ebx + 0x1038]
je 0x4c7fef
mov eax, dword [ebx]
push 4
push ecx
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x541740]
mov ecx, ebx
call esi
mov dword [ebp - 4], 0xffffffff
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x4048]
xor ecx, ebp
call fcn.0051dca8
lea esp, [ebp + 0x404c]
pop ebp
ret 4