Function at 0x4991c0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x54
push ebx
push esi
push edi
push 0
push 0x80
push 3
push 0
push 3
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [esp + 0x10], ebx
jne 0x499252
push 0x1a
call fcn.005223fb
add esp, 4
test eax, eax
jne 0x49921f
call fcn.0044b7dc
xor eax, eax
mov ecx, dword [eax + 0xe]
mov esi, dword [ebp + 8]
push ecx
mov dword [esi], eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea ecx, [eax + 0x15]
mov dword [eax], 0x595194
and ecx, 0xfffffffc
mov dword [eax + 0xe], ecx
mov dword [ecx], 0
mov dword [eax + 4], 0x2b11
mov byte [eax + 8], 1
mov dword [eax + 9], 0x200000
mov dword [eax], 0x5951b4
mov byte [eax + 0xd], 4
jmp 0x499205
push 0
lea edx, [esp + 0x20]
push edx
push 4
lea eax, [esp + 0x30]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, str.fLaC
lea esi, [esp + 0x24]
mov ecx, 5
xor edx, edx
mov byte [esp + 0x28], 0
repe cmpsb byte [esi], byte es:[edi]
je 0x4993b3
lea eax, [esp + 0x24]
push 0x58e804
push eax
call fcn.005210b0
lea ecx, [esp + 0x2c]
add esp, 8
cmp eax, ecx
jne 0x499336
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
jmp 0x4992b0
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea edx, [esp + 0x18]
push edx
push 6
lea eax, [esp + 0x30]
push eax
push ebx
call esi
cmp dword [esp + 0x14], 6
jne 0x499336
movzx eax, byte [esp + 0x26]
movzx ecx, byte [esp + 0x27]
movzx edx, byte [esp + 0x28]
shl eax, 7
add eax, ecx
movzx ecx, byte [esp + 0x29]
shl eax, 7
add eax, edx
shl eax, 7
push 1
add eax, ecx
cdq
push 0
push edx
push eax
push ebx
call edi
push 0
lea edx, [esp + 0x1c]
push edx
push 4
lea eax, [esp + 0x30]
push eax
push ebx
mov byte [esp + 0x3c], 0
call esi
cmp dword [esp + 0x18], 4
jne 0x499336
lea ecx, [esp + 0x24]
push 0x58e804
push ecx
call fcn.005210b0
lea edx, [esp + 0x2c]
add esp, 8
cmp eax, edx
je 0x4992b0
mov edi, str.fLaC
lea esi, [esp + 0x24]
mov ecx, 5
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x4993b3
push 0x1a
call fcn.005223fb
add esp, 4
test eax, eax
jne 0x499380
call fcn.0044b7dc
xor eax, eax
mov ecx, dword [eax + 0xe]
mov esi, dword [ebp + 8]
push ecx
mov dword [esi], eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov dword [eax], 0x595194
lea ecx, [eax + 0x15]
and ecx, 0xfffffffc
mov dword [eax + 0xe], ecx
mov dword [ecx], 0
mov dword [eax + 4], 0x2b11
mov byte [eax + 8], 1
mov dword [eax + 9], 0x200000
mov dword [eax], 0x5951b4
mov byte [eax + 0xd], 3
jmp 0x49935f
push 0
lea edx, [esp + 0x24]
push edx
push 4
lea eax, [esp + 0x18]
push eax
push ebx
mov dword [esp + 0x20], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0xc]
bswap eax
mov dword [esp + 0xc], eax
shr eax, 0x18
test al, 0x7f
jne 0x49934a
lea eax, [esp + 0x30]
call fcn.0048f330
lea edi, [esp + 0x10]
lea eax, [esp + 0x30]
call fcn.00499b60
push 0x172
call fcn.005223fb
add esp, 4
test eax, eax
jne 0x499468
call fcn.0044b7dc
mov esi, dword [0x5aa658]
test esi, esi
jne 0x49943e
push 0x1a
call fcn.005223fb
add esp, 4
test eax, eax
jne 0x49948c
call fcn.0044b7dc
mov edx, dword [esi + 0xe]
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov dword [0x5aa658], esi
mov eax, dword [ebp + 8]
mov dword [eax], esi
mov esi, eax
mov ecx, dword [esi]
mov edx, dword [ecx + 0xe]
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
cmp ebx, 0xffffffff
je 0x49945d
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea edx, [esp + 0xc]
push edx
lea ecx, [esp + 0x14]
push ecx
lea edi, [esp + 0x38]
mov esi, eax
call fcn.004994d0
test eax, eax
mov ebx, dword [esp + 0x10]
je 0x499411
mov esi, dword [ebp + 8]
mov dword [esi], eax
jmp 0x499445
lea ecx, [eax + 0x15]
mov dword [eax], 0x595194
and ecx, 0xfffffffc
mov dword [eax + 0xe], ecx
mov dword [ecx], 0
mov dword [eax + 4], 0x2b11
mov byte [eax + 8], 1
mov dword [eax + 9], 0x200000
mov dword [eax], 0x5951b4
mov byte [eax + 0xd], 1
mov esi, eax
jmp 0x49942e