Function at 0x5f5d54
Capabilities:
Extract resource via kernel32 functions
Get file size
Read file on windows

Disassembly:
push 0x8d0
mov eax, 0x6a20b2
call fcn.00635544
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x684]
mov dword [ebp - 0x8d8], ebx
call fcn.005dbbb7
xor edi, edi
lea ecx, [ebp - 0x684]
push edi
push edi
push ebx
mov dword [ebp - 4], edi
call fcn.005e07b1
lea eax, [ebp - 0x57c]
push eax
lea ecx, [ebp - 0x3ac]
call fcn.005e5851
mov byte [ebp - 4], 1
mov dword [ebp - 0x8bc], edi
mov dword [ebp - 0x8b8], edi
call fcn.005dd9f4
push eax
lea ecx, [ebp - 0x94]
call fcn.005e5851
mov byte [ebp - 4], 2
call fcn.005dd9fa
mov ecx, eax
call fcn.005e60cf
test al, al
je 0x5f5e89
lea eax, [ebp - 0x3ac]
push eax
lea ecx, [ebp - 0x94]
call fcn.005e5b2f
push edi
push 0x80
push 3
push edi
push 1
push SysReAllocString
lea ecx, [ebp - 0x94]
call fcn.00405e20
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x5f5e24
lea ecx, [ebp - 0x94]
mov byte [ebp - 4], 1
call fcn.005e5978
jmp 0x5f6013
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x8b8], eax
test eax, eax
je 0x5f5e10
push eax
mov dword [ebp - 0x8c8], edi
call fcn.006354e1
pop ecx
mov ebx, eax
lea eax, [ebp - 0x8c8]
push edi
push eax
push dword [ebp - 0x8b8]
mov dword [ebp - 0x8bc], ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x8b8]
cmp dword [ebp - 0x8c8], eax
je 0x5f5ffc
push ebx
call fcn.00634f16
pop ecx
mov dword [ebp - 0x8bc], edi
jmp 0x5f5e10
call fcn.005dd9fa
push eax
lea ecx, [ebp - 0x94]
call fcn.005e5b2f
call fcn.005ddc63
test al, al
je 0x5f5eac
call fcn.005dda00
mov esi, eax
jmp 0x5f5f11
call fcn.005dda06
push eax
lea ecx, [ebp - 0x220]
call fcn.005e5851
push edi
lea ecx, [ebp - 0x220]
mov byte [ebp - 4], 3
call fcn.00405e20
push eax
call fcn.005e287d
pop ecx
pop ecx
push eax
lea ecx, [ebp - 0x94]
mov dword [ebp - 0x8c0], eax
call fcn.00405e20
push eax
call fcn.005e7304
mov esi, eax
mov eax, dword [ebp - 0x8c0]
pop ecx
pop ecx
test eax, eax
je 0x5f5f02
push eax
call fcn.00634f16
pop ecx
lea ecx, [ebp - 0x220]
mov byte [ebp - 4], 2
call fcn.005e5978
test esi, esi
je 0x5f5e10
lea eax, [ebp - 0x3ac]
mov dword [ebp - 0x8cc], edi
push eax
lea ecx, [ebp - 0x328]
call fcn.005e5851
push 0x6d79b0
push 0x6d24c0
lea ecx, [ebp - 0x328]
mov byte [ebp - 4], 4
call fcn.005e6283
lea eax, [ebp - 0x8b4]
push eax
lea eax, [ebp - 0x8cc]
push eax
push 1
lea ecx, [ebp - 0x328]
call fcn.00405e20
push eax
push esi
call fcn.005e6cea
add esp, 0x14
test eax, eax
je 0x5f5f83
lea ecx, [ebp - 0x328]
call fcn.005e5978
jmp 0x5f5e10
mov eax, dword [ebp - 0x688]
mov dword [ebp - 0x8b8], eax
test eax, eax
je 0x5f5f73
push eax
call fcn.006354e1
push dword [ebp - 0x8b8]
mov ebx, eax
mov dword [ebp - 0x8bc], eax
push ebx
push dword [ebp - 0x8cc]
push esi
call fcn.005e7743
add esp, 0x14
test eax, eax
je 0x5f5fe1
cmp eax, 0x600
je 0x5f5fe1
push ebx
call fcn.00634f16
pop ecx
mov dword [ebp - 0x8bc], edi
call fcn.005ddc63
test al, al
jne 0x5f5f73
push esi
call fcn.005e6acd
pop ecx
jmp 0x5f5f73
call fcn.005ddc63
test al, al
jne 0x5f5ff1
push esi
call fcn.005e6acd
pop ecx
lea ecx, [ebp - 0x328]
call fcn.005e5978
lea ecx, [ebp - 0x94]
mov byte [ebp - 4], 1
call fcn.005e5978
test ebx, ebx
jne 0x5f651a
push edi
push 0x80
push 3
push edi
push 1
push SysReAllocString
lea ecx, [ebp - 0x3ac]
call fcn.00405e20
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x5f60a6
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x8b8], eax
test eax, eax
je 0x5f60a6
push eax
mov dword [ebp - 0x8d0], edi
call fcn.006354e1
pop ecx
mov ebx, eax
lea eax, [ebp - 0x8d0]
push edi
push eax
push dword [ebp - 0x8b8]
mov dword [ebp - 0x8bc], ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x8b8]
cmp dword [ebp - 0x8d0], esi
je 0x5f64a8
push ebx
call fcn.00634f16
pop ecx
mov ebx, edi
mov dword [ebp - 0x8bc], edi
jmp 0x5f64a8
mov eax, dword [ebp - 0x8d8]
lea ecx, [ebp - 0x2a4]
push 0xffffffffffffffff
push eax
mov esi, eax
call fcn.005e5876
push 0xffffffffffffffff
push 0x6c1840
lea ecx, [ebp - 0x220]
mov byte [ebp - 4], 5
call fcn.005e5876
lea ecx, [ebp - 0x19c]
mov byte [ebp - 4], 6
call fcn.005e589a
lea ecx, [ebp - 0x118]
mov byte [ebp - 4], 7
call fcn.005e589a
mov byte [ebp - 4], 8
mov ecx, edi
mov dword [ebp - 0x8d4], edi
mov dword [ebp - 0x8c0], edi
xor eax, eax
cmp ecx, 1
cmovne eax, esi
mov esi, eax
test eax, eax
je 0x5f637a
cmp word [eax], di
je 0x5f637a
push 0x20
pop ebx
lea ecx, [ebp - 0x19c]
call fcn.005e5d1c
lea ecx, [ebp - 0x118]
call fcn.005e5d1c
movzx ecx, word [esi]
mov eax, ecx
test cx, cx
je 0x5f615f
mov edx, ecx
movzx eax, dx
cmp dx, bx
ja 0x5f615f
push esi
call dword [sym.imp.USER32.dll_CharNextW]
mov esi, eax
movzx ecx, word [esi]
mov edx, ecx
mov eax, ecx
test cx, cx
jne 0x5f6142
movzx ecx, ax
test ax, ax
je 0x5f61c8
movzx edx, ax
push 0x3d
pop eax
movzx ecx, dx
cmp dx, ax
je 0x5f61c8
movzx ecx, dx
cmp dx, bx
jbe 0x5f61c8
push esi
call dword [sym.imp.USER32.dll_CharNextW]
mov ecx, eax
xor edx, edx
sub ecx, esi
mov ebx, edi
inc ecx
shr ecx, 1
cmp esi, eax
cmova ecx, edx
mov dword [ebp - 0x8c4], ecx
test ecx, ecx
je 0x5f61b9
mov edi, ecx
movzx eax, word [esi]
lea ecx, [ebp - 0x19c]
push eax
call fcn.005e5b67
add esi, 2
inc ebx
cmp ebx, edi
jb 0x5f61a0
xor edi, edi
movzx eax, word [esi]
mov edx, eax
mov ecx, eax
push 0x20
pop ebx
test ax, ax
jne 0x5f616a
movzx edx, cx
push 0x20
pop ebx
test cx, cx
je 0x5f61f3
movzx ecx, cx
movzx edx, cx
cmp cx, bx
ja 0x5f61f3
push esi
call dword [sym.imp.USER32.dll_CharNextW]
mov esi, eax
movzx eax, word [esi]
mov ecx, eax
mov edx, eax
test ax, ax
jne 0x5f61d6
push 0x3d
pop eax
add esi, 2
cmp dx, ax
jne 0x5f6374
movzx eax, word [esi]
mov ecx, eax
test ax, ax
je 0x5f622b
mov edx, eax
movzx ecx, dx
cmp dx, bx
ja 0x5f622b
push esi
call dword [sym.imp.USER32.dll_CharNextW]
mov esi, eax
movzx eax, word [esi]
mov edx, eax
mov ecx, eax
test ax, ax
jne 0x5f620e
push 0x27
pop ebx
add esi, 2
cmp cx, bx
jne 0x5f6374
movzx eax, word [esi]
mov ecx, eax
test ax, ax
je 0x5f6299
mov edx, eax
movzx ecx, dx
cmp dx, bx
je 0x5f6299
push esi
call dword [sym.imp.USER32.dll_CharNextW]
mov ecx, eax
xor edx, edx
sub ecx, esi
mov ebx, edi
inc ecx
shr ecx, 1
cmp esi, eax
cmova ecx, edx
mov dword [ebp - 0x8c4], ecx
test ecx, ecx
je 0x5f628a
mov edi, ecx
movzx eax, word [esi]
lea ecx, [ebp - 0x118]
push eax
call fcn.005e5b67
add esi, 2
inc ebx
cmp ebx, edi
jb 0x5f6271
xor edi, edi
movzx eax, word [esi]
mov edx, eax
mov ecx, eax
push 0x27
pop ebx
test ax, ax
jne 0x5f6246
add esi, 2
cmp cx, bx
jne 0x5f6374
lea ecx, [ebp - 0x118]
call fcn.005e60cf
test al, al
jne 0x5f635d
push str.file
lea ecx, [ebp - 0x19c]
call fcn.005e5a3e
test al, al
jne 0x5f634b
push 0x6d79a8
lea ecx, [ebp - 0x19c]
call fcn.005e5a3e
test al, al
jne 0x5f634b
push 0x6a6978
lea ecx, [ebp - 0x19c]
call fcn.005e5a3e
test al, al
je 0x5f62fc
lea ecx, [ebp - 0x220]
jmp 0x5f6351
push str.mask
lea ecx, [ebp - 0x19c]
call fcn.005e5a3e
test al, al
je 0x5f635d
push edi
lea ecx, [ebp - 0x118]
call fcn.005e5a67
cmp ax, 0x23
lea ecx, [ebp - 0x118]
push 0x10
lea eax, [ebp - 0x8d4]
push eax
jne 0x5f6344
call fcn.00405e20
add eax, 2
push eax
call fcn.0065911c
add esp, 0xc
jmp 0x5f635d
call fcn.00405e20
jmp 0x5f6339
lea ecx, [ebp - 0x2a4]
lea eax, [ebp - 0x118]
push eax
call fcn.005e59fb
movzx eax, word [esi]
add esi, 2
push 0x20
pop ebx
cmp ax, bx
jne 0x5f6374
cmp word [esi], di
jne 0x5f6120
mov ecx, dword [ebp - 0x8c0]
inc ecx
mov dword [ebp - 0x8c0], ecx
cmp ecx, 2
jl 0x5f6102
mov ebx, dword [ebp - 0x8bc]
lea ecx, [ebp - 0x2a4]
mov dword [ebp - 0x8c0], edi
call fcn.00405e20
movzx eax, word [eax]
push eax
call fcn.006577b9
pop ecx
test eax, eax
je 0x5f63d8
push 0xa
lea eax, [ebp - 0x8dc]
mov dword [ebp - 0x8dc], edi
push eax
lea ecx, [ebp - 0x2a4]
call fcn.00405e20
push eax
call fcn.006590f0
add esp, 0xc
mov dword [ebp - 0x8c0], eax
call fcn.005dd9e5
mov esi, eax
lea ecx, [ebp - 0x220]
mov dword [ebp - 0x8bc], esi
call fcn.00405e20
push eax
mov eax, dword [ebp - 0x8c0]
movzx ecx, ax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test esi, esi
je 0x5f64ea
push esi
push dword [ebp - 0x8bc]
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x8c0], eax
push esi
test eax, eax
je 0x5f64e4
push dword [ebp - 0x8bc]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
mov dword [ebp - 0x8b8], esi
test esi, esi
je 0x5f64b2
push esi
call fcn.006354e1
pop ecx
push esi
push dword [ebp - 0x8c0]
mov ebx, eax
mov dword [ebp - 0x8bc], ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push ebx
call fcn.0064c510
add esp, 0xc
push dword [ebp - 0x8c0]
call dword [sym.imp.KERNEL32.dll_FreeResource]
lea ecx, [ebp - 0x118]
call fcn.005e5978
lea ecx, [ebp - 0x19c]
call fcn.005e5978
lea ecx, [ebp - 0x220]
call fcn.005e5978
lea ecx, [ebp - 0x2a4]
mov byte [ebp - 4], 1
call fcn.005e5978
test ebx, ebx
je 0x5f60a6
jmp 0x5f6520
lea ecx, [ebp - 0x118]
call fcn.005e5978
lea ecx, [ebp - 0x19c]
call fcn.005e5978
lea ecx, [ebp - 0x220]
call fcn.005e5978
lea ecx, [ebp - 0x2a4]
mov byte [ebp - 4], 1
call fcn.005e5978
jmp 0x5f6520
call dword [sym.imp.KERNEL32.dll_FreeResource]
lea ecx, [ebp - 0x118]
call fcn.005e5978
lea ecx, [ebp - 0x19c]
call fcn.005e5978
lea ecx, [ebp - 0x220]
call fcn.005e5978
lea ecx, [ebp - 0x2a4]
mov byte [ebp - 4], 1
call fcn.005e5978
mov esi, dword [ebp - 0x8b8]
test ebx, ebx
je 0x5f6536
push esi
push ebx
call fcn.005f5ceb
push ebx
mov edi, eax
call fcn.00634f16
add esp, 0xc
lea ecx, [ebp - 0x3ac]
call fcn.005e5978
lea ecx, [ebp - 0x684]
call fcn.005dc02e
mov eax, edi
call fcn.006354ff
ret