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

Disassembly:
push 0xffffffffffffffff
push 0x7be793
mov eax, dword fs:[0]
push eax
sub esp, 0x798
mov eax, dword [0x89b044]
xor eax, esp
mov dword [esp + 0x794], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x89b044]
xor eax, esp
push eax
lea eax, [esp + 0x7ac]
mov dword fs:[0], eax
mov eax, dword [esp + 0x7bc]
mov esi, dword [esp + 0x7c0]
push 0xffffffffffffffff
push eax
lea ecx, [esp + 0x10c]
call fcn.0059d4a0
push 4
lea ecx, [esp + 0x84]
push ecx
xor ebx, ebx
lea ecx, [esp + 0x10c]
mov dword [esp + 0x7bc], ebx
call fcn.0059d900
mov ecx, eax
mov byte [esp + 0x7b4], 1
call fcn.0059ccc0
push eax
push 0x80288c
call fcn.00723690
add esp, 8
test eax, eax
lea ecx, [esp + 0x80]
sete byte [esp + 0x17]
mov byte [esp + 0x7b4], bl
call fcn.0059cc80
cmp byte [esp + 0x17], bl
je 0x5cafff
push 0x1fe
lea ecx, [esp + 0x18e]
xor edx, edx
xor eax, eax
push ebx
push ecx
mov word [esp + 0x3ac], dx
mov dword [esp + 0x3ae], ebx
mov word [esp + 0x194], ax
call fcn.007202b0
push 0x1fe
lea eax, [esp + 0x5ba]
xor edx, edx
push ebx
push eax
mov word [esp + 0x5c0], dx
call fcn.007202b0
push 0x1fe
lea edx, [esp + 0x3c6]
xor ecx, ecx
push ebx
push edx
mov word [esp + 0x3cc], cx
call fcn.007202b0
push 0x100
lea eax, [esp + 0x3d0]
push eax
push 0x100
lea ecx, [esp + 0x5d8]
push ecx
mov ecx, dword [esp + 0x7f0]
push 0x100
lea edx, [esp + 0x1c0]
push edx
push 3
lea eax, [esp + 0x3e0]
push eax
push ecx
call fcn.0072d2e0
add esp, 0x48
lea edx, [esp + 0x3a8]
push 0x80288c
push edx
call fcn.00723690
add esp, 8
test eax, eax
jne 0x5cafff
lea ecx, [esp + 0x80]
call fcn.0059cc50
mov byte [esp + 0x7b4], 2
mov ecx, 0x830150
lea eax, [esp + 0x3a0]
mov edi, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x5caf36
cmp dx, bx
je 0x5caf32
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x5caf36
add eax, 4
add ecx, 4
cmp dx, bx
jne 0x5caf10
xor eax, eax
jmp 0x5caf3b
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x5caf51
call fcn.00596610
push eax
lea ecx, [esp + 0x84]
call fcn.0059cf20
mov eax, dword [esp + 0x7bc]
push eax
lea ecx, [esp + 0x84]
call fcn.0059d0e0
push 0x50
push ebx
push ebx
push 1
lea ecx, [esp + 0x90]
call fcn.0059cef0
push eax
push ebx
call dword [sym.imp.USER32.dll_LoadImageW]
mov edi, eax
cmp edi, ebx
je 0x5cafec
push 0x98
call fcn.00704930
mov esi, eax
add esp, 4
mov dword [esp + 0x30], esi
mov byte [esp + 0x7b4], 3
cmp esi, ebx
je 0x5cafae
lea ecx, [esi + 0x10]
call fcn.0059cc50
jmp 0x5cafb0
xor esi, esi
lea ecx, [esi + 8]
push ecx
lea edx, [esi + 4]
push edx
push edi
call fcn.005c4e30
mov dword [esi], eax
mov eax, dword [esp + 0x7d0]
add esp, 0xc
lea ecx, [esp + 0x80]
mov byte [esi + 0xc], 1
mov dword [esi + 0x94], eax
mov byte [esp + 0x7b4], bl
call fcn.0059cc80
jmp 0x5cb5aa
lea ecx, [esp + 0x80]
mov byte [esp + 0x7b4], bl
call fcn.0059cc80
mov ebp, dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x20], ebx
cmp esi, ebx
jne 0x5cb29e
call fcn.00596610
push eax
lea ecx, [esp + 0x84]
call fcn.0059d4d0
mov byte [esp + 0x7b4], 4
call fcn.00596620
mov ecx, eax
call fcn.0059cec0
test al, al
je 0x5cb11b
mov ecx, dword [esp + 0x7bc]
push ecx
lea ecx, [esp + 0x84]
call fcn.0059d0e0
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
lea ecx, [esp + 0x98]
call fcn.0059cef0
push eax
call ebp
mov esi, eax
cmp esi, 0xffffffff
jne 0x5cb095
lea ecx, [esp + 0x80]
mov byte [esp + 0x7b4], bl
call fcn.0059cc80
jmp 0x5cb30f
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esp + 0x20], eax
cmp eax, ebx
jne 0x5cb0bd
lea ecx, [esp + 0x80]
mov byte [esp + 0x7b4], bl
call fcn.0059cc80
jmp 0x5cb30f
push eax
mov dword [esp + 0x28], ebx
call fcn.0070a654
mov ecx, dword [esp + 0x24]
add esp, 4
push ebx
lea edx, [esp + 0x28]
push edx
push ecx
push eax
push esi
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0x24]
cmp edx, dword [esp + 0x20]
je 0x5cb07d
mov eax, dword [esp + 0x18]
push eax
call fcn.00725356
add esp, 4
lea ecx, [esp + 0x80]
mov dword [esp + 0x18], ebx
mov byte [esp + 0x7b4], bl
call fcn.0059cc80
jmp 0x5cb30f
call fcn.00596620
push eax
lea ecx, [esp + 0x84]
call fcn.0059d0c0
call fcn.00596630
test al, al
je 0x5cb25a
call fcn.00596640
mov edi, eax
cmp edi, ebx
jne 0x5cb15d
lea ecx, [esp + 0x80]
mov byte [esp + 0x7b4], bl
call fcn.0059cc80
jmp 0x5cb30f
mov edx, dword [esp + 0x7bc]
xor ecx, ecx
mov eax, edx
mov dword [esp + 0x50], 7
mov dword [esp + 0x4c], ebx
mov word [esp + 0x3c], cx
lea esi, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x5cb180
sub eax, esi
sar eax, 1
push eax
push edx
lea ecx, [esp + 0x40]
call fcn.00404850
lea edx, [esp + 0x188]
push edx
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x40]
push ecx
push edi
mov byte [esp + 0x7c4], 5
call fcn.0063f7f0
add esp, 0x10
test eax, eax
sete byte [esp + 0x17]
cmp dword [esp + 0x50], 8
mov byte [esp + 0x7b4], 4
jb 0x5cb1e0
mov edx, dword [esp + 0x3c]
push edx
call fcn.00704960
add esp, 4
cmp byte [esp + 0x17], bl
je 0x5cb1fe
lea ecx, [esp + 0x80]
mov byte [esp + 0x7b4], bl
call fcn.0059cc80
jmp 0x5cb30f
mov eax, dword [esp + 0x39c]
mov dword [esp + 0x20], eax
cmp eax, ebx
jne 0x5cb225
lea ecx, [esp + 0x80]
mov byte [esp + 0x7b4], bl
call fcn.0059cc80
jmp 0x5cb30f
push eax
call fcn.0070a654
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
push ecx
push eax
push edx
push edi
mov dword [esp + 0x2c], eax
call fcn.0063e180
add esp, 0x14
test eax, eax
jne 0x5cb07d
mov eax, dword [esp + 0x18]
push eax
call fcn.00704960
jmp 0x5cb0fc
mov eax, dword [esp + 0x7bc]
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x1c]
push edx
push eax
lea ecx, [esp + 0x8c]
call fcn.0059cef0
push eax
call fcn.00645940
add esp, 0x10
cmp eax, ebx
jge 0x5cb07d
lea ecx, [esp + 0x80]
mov byte [esp + 0x7b4], bl
call fcn.0059cc80
jmp 0x5cb30f
mov ecx, dword [esp + 0x7bc]
push esi
push ecx
call fcn.00596600
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
cmp esi, ebx
je 0x5cb30f
push esi
call fcn.00596600
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
push esi
cmp edi, ebx
je 0x5cb309
call fcn.00596600
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [esp + 0x20], eax
cmp eax, ebx
je 0x5cb30f
push eax
call fcn.0070a654
mov edx, dword [esp + 0x24]
add esp, 4
push edx
push edi
mov dword [esp + 0x20], eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
mov eax, dword [esp + 0x20]
push eax
call fcn.007248d0
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, dword [esp + 0x18]
cmp eax, ebx
jne 0x5cb3ba
mov ecx, dword [esp + 0x7bc]
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
push ecx
call ebp
mov esi, eax
cmp esi, 0xffffffff
je 0x5cb394
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esp + 0x20], eax
cmp eax, ebx
je 0x5cb394
push eax
mov dword [esp + 0x28], ebx
call fcn.0070a654
mov ecx, dword [esp + 0x24]
add esp, 4
push ebx
lea edx, [esp + 0x28]
push edx
push ecx
push eax
push esi
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0x24]
cmp edx, dword [esp + 0x20]
je 0x5cb394
mov eax, dword [esp + 0x18]
push eax
call fcn.00725356
add esp, 4
mov dword [esp + 0x18], ebx
jmp 0x5cb39c
mov eax, dword [esp + 0x18]
cmp eax, ebx
jne 0x5cb3ba
lea ecx, [esp + 0x104]
mov dword [esp + 0x7b4], 0xffffffff
call fcn.0059cc80
xor eax, eax
jmp 0x5cb5c3
push 4
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x34]
push edx
mov edx, dword [esp + 0x2c]
lea ecx, [esp + 0x34]
push ecx
push edx
push eax
call fcn.00666fc0
mov esi, eax
mov eax, dword [esp + 0x30]
push eax
mov dword [esp + 0x4c], esi
call fcn.00725356
add esp, 0x1c
cmp esi, ebx
je 0x5cb39c
push 0x2c
lea ecx, [esp + 0x58]
push ebx
push ecx
call fcn.007202b0
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x64], eax
imul eax, ecx
add esp, 0xc
add eax, eax
push ebx
add eax, eax
push ebx
mov edx, ecx
neg edx
mov dword [esp + 0x70], eax
lea eax, [esp + 0x24]
push eax
mov dword [esp + 0x68], edx
push ebx
mov edx, 1
lea ecx, [esp + 0x64]
mov word [esp + 0x70], dx
push ecx
mov edx, 0x20
push ebx
mov dword [esp + 0x6c], 0x28
mov word [esp + 0x7a], dx
mov dword [esp + 0x7c], ebx
mov byte [esp + 0x2f], bl
mov dword [esp + 0x34], ebx
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov edi, eax
mov dword [esp + 0x3a0], edi
cmp edi, ebx
je 0x5cb39c
mov edx, dword [esp + 0x28]
imul edx, dword [esp + 0x2c]
xor ecx, ecx
test edx, edx
jle 0x5cb562
mov ebp, dword [esp + 0x7c4]
mov eax, dword [esp + 0x1c]
add esi, 3
lea ebx, [ebx]
mov dl, byte [esi]
mov byte [eax + ecx*4 + 3], dl
mov edi, dword [esp + 0x1c]
cmp byte [edi + ecx*4 + 3], 0xff
jae 0x5cb4f7
movzx eax, byte [esi]
movzx edx, byte [esi - 1]
imul edx, eax
mov eax, 0x80808081
mul edx
shr edx, 7
mov byte [edi + ecx*4], dl
movzx eax, byte [esi]
movzx edx, byte [esi - 2]
imul edx, eax
mov eax, 0x80808081
mul edx
mov eax, dword [esp + 0x1c]
shr edx, 7
mov byte [eax + ecx*4 + 1], dl
movzx eax, byte [esi]
movzx edx, byte [esi - 3]
imul edx, eax
mov eax, 0x80808081
mul edx
mov eax, dword [esp + 0x1c]
shr edx, 7
mov byte [eax + ecx*4 + 2], dl
mov byte [esp + 0x17], 1
jmp 0x5cb515
mov dl, byte [esi - 1]
mov byte [edi + ecx*4], dl
movzx eax, byte [esi - 2]
mov edx, dword [esp + 0x1c]
mov byte [edx + ecx*4 + 1], al
movzx eax, byte [esi - 3]
mov edx, dword [esp + 0x1c]
mov byte [edx + ecx*4 + 2], al
mov eax, dword [esp + 0x1c]
cmp dword [eax + ecx*4], ebp
jne 0x5cb542
mov byte [eax + ecx*4], bl
mov eax, dword [esp + 0x1c]
mov byte [eax + ecx*4 + 1], bl
mov edx, dword [esp + 0x1c]
mov byte [edx + ecx*4 + 2], bl
mov eax, dword [esp + 0x1c]
mov byte [eax + ecx*4 + 3], bl
mov eax, dword [esp + 0x1c]
mov byte [esp + 0x17], 1
mov edx, dword [esp + 0x28]
imul edx, dword [esp + 0x2c]
inc ecx
add esi, 4
cmp ecx, edx
jl 0x5cb490
mov edi, dword [esp + 0x3a0]
mov esi, dword [esp + 0x30]
push esi
call fcn.0065a700
push 0x98
call fcn.00704930
mov esi, eax
add esp, 8
mov dword [esp + 0x30], esi
mov byte [esp + 0x7b4], 6
cmp esi, ebx
je 0x5cb591
lea ecx, [esi + 0x10]
call fcn.0059cc50
jmp 0x5cb593
xor esi, esi
mov dl, byte [esp + 0x17]
mov dword [esi], edi
mov eax, dword [esp + 0x28]
mov dword [esi + 4], eax
mov ecx, dword [esp + 0x2c]
mov dword [esi + 8], ecx
mov byte [esi + 0xc], dl
lea ecx, [esp + 0x104]
mov dword [esp + 0x7b4], 0xffffffff
call fcn.0059cc80
mov eax, esi
mov ecx, dword [esp + 0x7ac]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x794]
xor ecx, esp
call fcn.0071fe0b
add esp, 0x7a4
ret