Function at 0x4363d1
Capabilities:
Check if file exists
Extract resource via kernel32 functions
Get common file path
Get file attributes
Get file size
Read file on windows

Disassembly:
push 0x620
mov eax, 0x497d14
call fcn.00466cfd
mov dword [ebp - 0x628], edx
mov dword [ebp - 0x624], ecx
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x620], eax
xor eax, eax
inc eax
mov byte [ebp - 0x601], al
lea eax, [ebp - 0x3c0]
mov dword [ebp - 0x3c4], eax
xor eax, eax
mov word [ebp - 0x3c0], ax
xor ebx, ebx
mov dword [ebp - 4], ebx
test ecx, ecx
jne 0x4365ed
push 0x4c16e8
lea ecx, [ebp - 0x33c]
call fcn.00420dc7
mov byte [ebp - 4], 1
mov eax, dword [0x4c1770]
cmp word [eax], bx
jne 0x4364f4
cmp dword [ebp + 8], ebx
je 0x436455
push dword [ebp + 8]
lea ecx, [ebp - 0x33c]
call fcn.00420e0d
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
push dword [ebp - 0x33c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x60c], edi
cmp edi, 0xffffffff
jne 0x436491
lea ecx, [ebp - 0x33c]
mov byte [ebp - 4], bl
call fcn.00420dec
jmp 0x4366a3
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test esi, esi
jne 0x4364a8
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x43647e
push esi
mov dword [ebp - 0x62c], ebx
call fcn.0045ed6b
pop ecx
mov edi, eax
lea eax, [ebp - 0x62c]
push ebx
push eax
push esi
push edi
push dword [ebp - 0x60c]
mov dword [ebp - 0x610], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x60c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x62c], esi
je 0x4365c7
push edi
call fcn.004607be
pop ecx
jmp 0x43647e
push eax
lea ecx, [ebp - 0x33c]
call fcn.00420e0d
cmp byte [0x4c1690], 0
je 0x436510
mov eax, dword [0x4c7598]
jmp 0x436520
mov ecx, dword [ebp - 0x33c]
xor edx, edx
push 2
call fcn.0043248b
pop ecx
mov dword [ebp - 0x608], eax
test eax, eax
je 0x43647e
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x5f4]
push ecx
lea ecx, [ebp - 0x600]
push ecx
push ecx
mov ecx, eax
call fcn.004324ed
add esp, 0xc
test eax, eax
jne 0x43647e
mov esi, dword [ebp - 0x3c8]
test esi, esi
je 0x43647e
push esi
call fcn.0045ed6b
mov edx, dword [ebp - 0x600]
mov edi, eax
mov ecx, dword [ebp - 0x608]
push esi
push edi
mov dword [ebp - 0x610], eax
call fcn.004325c0
add esp, 0xc
test eax, eax
je 0x4365b3
cmp eax, 0x600
je 0x4365b3
push edi
call fcn.004607be
cmp byte [0x4c1690], 0
pop ecx
jne 0x43647e
mov ecx, dword [ebp - 0x608]
call fcn.004325f3
jmp 0x43647e
cmp byte [0x4c1690], 0
jne 0x4365c7
mov ecx, dword [ebp - 0x608]
call fcn.004325f3
push 0xffffffffffffffff
push dword [ebp - 0x33c]
lea ecx, [ebp - 0x3c4]
call fcn.00420e92
lea ecx, [ebp - 0x33c]
mov byte [ebp - 4], bl
call fcn.00420dec
jmp 0x43669b
mov eax, dword [0x4c759c]
test eax, eax
push ecx
push dword [ebp + 8]
cmove eax, dword [0x4c7594]
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
mov dword [ebp - 0x61c], esi
test esi, esi
je 0x4366a3
mov ecx, dword [0x4c759c]
test ecx, ecx
push esi
cmove ecx, dword [0x4c7594]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x600], eax
push esi
test eax, eax
jne 0x436640
call dword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x4366a3
mov eax, dword [0x4c759c]
test eax, eax
cmove eax, dword [0x4c7594]
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
test esi, esi
je 0x4366a3
push esi
call fcn.0045ed6b
pop ecx
push esi
push dword [ebp - 0x600]
mov edi, eax
mov dword [ebp - 0x610], edi
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push edi
call fcn.00462db0
add esp, 0xc
push dword [ebp - 0x61c]
call dword [sym.imp.KERNEL32.dll_FreeResource]
push dword [ebp + 8]
lea ecx, [ebp - 0x3c4]
call fcn.00420f36
test edi, edi
jne 0x436751
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x60c], edi
cmp edi, 0xffffffff
je 0x436c68
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test esi, esi
jne 0x4366e7
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x436c68
push esi
mov dword [ebp - 0x61c], ebx
call fcn.0045ed6b
pop ecx
mov edi, eax
lea eax, [ebp - 0x61c]
push ebx
push eax
push esi
push edi
push dword [ebp - 0x60c]
mov dword [ebp - 0x610], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x60c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x61c], esi
je 0x436735
push edi
call fcn.004607be
pop ecx
mov edi, ebx
mov dword [ebp - 0x610], ebx
push dword [ebp + 8]
lea ecx, [ebp - 0x3c4]
mov byte [ebp - 0x601], bl
call fcn.00420f36
test edi, edi
je 0x436c68
mov edx, esi
mov ecx, edi
call fcn.00421683
mov edx, eax
lea edi, [ebp - 0x32]
push 7
xor eax, eax
mov dword [ebp - 0x60c], edx
pop ecx
mov word [ebp - 0x34], ax
rep stosd dword es:[edi], eax
push edx
push str._08x
stosw word es:[edi], ax
lea eax, [ebp - 0x34]
push eax
call fcn.004255a8
mov eax, dword [ebp - 0x620]
add esp, 0xc
cmp byte [ebp + 0x10], 0
jne 0x4367a3
test eax, eax
je 0x4367ba
push 0xffffffffffffffff
lea ecx, [ebp - 0x34]
push ecx
mov ecx, eax
call fcn.00420e92
jmp 0x4367ba
test eax, eax
je 0x4367ba
push 0x10
push ebx
push dword [eax]
call fcn.0046437f
add esp, 0xc
mov dword [ebp - 0x60c], eax
mov edi, dword [ebp - 0x610]
lea eax, [ebp - 0x600]
push ecx
push eax
lea eax, [ebp - 0x614]
mov dword [ebp - 0x608], ebx
push eax
lea eax, [ebp - 0x608]
mov dword [ebp - 0x614], ebx
push eax
mov edx, esi
mov dword [ebp - 0x600], ebx
mov ecx, edi
call fcn.00444012
mov dword [ebp - 0x610], eax
movzx eax, word [edi]
push edi
mov dword [ebp - 0x618], eax
call fcn.004607be
mov edi, dword [ebp - 0x610]
add esp, 0x14
test edi, edi
jne 0x436a31
cmp dword [ebp - 0x600], 4
jl 0x436c68
cmp esi, 2
jbe 0x436c68
mov eax, 0xd8ff
cmp word [ebp - 0x618], ax
jne 0x436c68
cmp byte [ebp + 0x10], 0
jne 0x436c68
xor eax, eax
mov esi, 0x206
push esi
mov word [ebp - 0x5cc], ax
lea eax, [ebp - 0x5ca]
push ebx
push eax
call fcn.00462c70
add esp, 0xc
lea eax, [ebp - 0x5cc]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
xor eax, eax
push esi
mov word [ebp - 0x23c], ax
lea eax, [ebp - 0x23a]
push ebx
push eax
call fcn.00462c70
mov eax, dword [ebp - 0x60c]
add esp, 0xc
push eax
lea eax, [ebp - 0x5cc]
push eax
lea eax, [ebp - 0x23c]
push 0x4ae424
push eax
call fcn.0043b3b7
add esp, 0x10
mov dword [ebp - 0x25c], ebx
lea ecx, [ebp - 0x26c]
push 7
pop esi
push ebx
mov dword [ebp - 0x258], esi
call fcn.0040c860
push ebx
lea ecx, [ebp - 0x254]
mov dword [ebp - 0x244], ebx
mov dword [ebp - 0x240], esi
call fcn.0040c860
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x284]
push dword [ebp - 0x3c4]
call fcn.0040e040
lea eax, [ebp - 0x23c]
mov byte [ebp - 4], 4
push eax
lea ecx, [ebp - 0x254]
call fcn.0040e0a0
lea eax, [ebp - 0x23c]
push eax
lea ecx, [ebp - 0x26c]
call fcn.0040e0a0
lea eax, [ebp - 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4369d3
mov esi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push 1
call esi
push ebx
mov dword [ebp - 0x600], eax
call esi
mov edi, dword [ebp - 0x608]
mov ebx, eax
mov esi, dword [ebp - 0x614]
mov eax, dword [ebp - 0x600]
cmp edi, ebx
jle 0x43696b
cmp esi, eax
jg 0x436973
test edi, edi
jne 0x4369a0
test esi, esi
jne 0x4369a0
cmp dword [ebp - 0x240], 8
lea edx, [ebp - 0x254]
lea ecx, [ebp - 0x284]
cmovae edx, dword [ebp - 0x254]
cmp dword [ebp - 0x270], 8
cmovae ecx, dword [ebp - 0x284]
push ecx
push ebx
push eax
jmp 0x4369cb
cmp dword [ebp - 0x240], 8
lea edx, [ebp - 0x254]
lea ecx, [ebp - 0x284]
cmovae edx, dword [ebp - 0x254]
cmp dword [ebp - 0x270], 8
cmovae ecx, dword [ebp - 0x284]
push ecx
push edi
push esi
call fcn.004354a9
add esp, 0xc
cmp dword [ebp - 0x258], 8
lea ecx, [ebp - 0x26c]
mov eax, dword [ebp - 0x620]
cmovae ecx, dword [ebp - 0x26c]
mov edx, dword [ebp - 0x628]
push 1
push eax
push ecx
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [ebp - 0x624]
call fcn.004363d1
add esp, 0xc
lea ecx, [ebp - 0x284]
mov ebx, eax
call fcn.0040b5d0
lea ecx, [ebp - 0x254]
call fcn.0040b5d0
lea ecx, [ebp - 0x26c]
call fcn.0040b5d0
jmp 0x436c68
push 0x2c
lea eax, [ebp - 0x2b0]
push ebx
push eax
call fcn.00462c70
mov eax, dword [ebp - 0x614]
add esp, 0xc
mov ecx, dword [ebp - 0x608]
neg eax
mov dword [ebp - 0x2a8], eax
xor eax, eax
inc eax
mov dword [ebp - 0x2b0], 0x28
push 0x20
mov word [ebp - 0x2a4], ax
pop eax
mov word [ebp - 0x2a2], ax
mov eax, dword [ebp - 0x614]
imul eax, ecx
push ebx
push ebx
mov dword [ebp - 0x2ac], ecx
mov dword [ebp - 0x2a0], ebx
mov dword [ebp - 0x600], eax
shl eax, 2
mov dword [ebp - 0x29c], eax
lea eax, [ebp - 0x5fc]
push eax
push ebx
lea eax, [ebp - 0x2b0]
mov byte [ebp - 0x5f5], bl
push eax
push ebx
mov dword [ebp - 0x5fc], ebx
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov dword [ebp - 0x618], eax
test eax, eax
je 0x436c68
mov edx, dword [ebp - 0x600]
mov esi, ebx
test edx, edx
jle 0x436bcf
mov eax, dword [ebp - 0x5fc]
mov cl, byte [edi + esi*4 + 3]
mov byte [eax + esi*4 + 3], cl
mov eax, 0xff
mov ecx, dword [ebp - 0x5fc]
cmp byte [ecx + esi*4 + 3], al
jae 0x436b69
movzx ecx, byte [edi + esi*4 + 3]
xor edx, edx
movzx eax, byte [edi + esi*4 + 2]
imul eax, ecx
mov ecx, 0xff
div ecx
mov ecx, dword [ebp - 0x5fc]
xor edx, edx
mov byte [ecx + esi*4], al
movzx ecx, byte [edi + esi*4 + 3]
movzx eax, byte [edi + esi*4 + 1]
imul eax, ecx
mov ecx, 0xff
div ecx
mov ecx, dword [ebp - 0x5fc]
xor edx, edx
mov byte [ecx + esi*4 + 1], al
movzx ecx, byte [edi + esi*4 + 3]
movzx eax, byte [edi + esi*4]
imul eax, ecx
mov ecx, 0xff
div ecx
mov ecx, dword [ebp - 0x5fc]
mov edx, dword [ebp - 0x600]
mov byte [ecx + esi*4 + 2], al
xor eax, eax
inc eax
mov byte [ebp - 0x5f5], al
jmp 0x436b8b
mov al, byte [edi + esi*4 + 2]
mov byte [ecx + esi*4], al
mov eax, dword [ebp - 0x5fc]
mov cl, byte [edi + esi*4 + 1]
mov byte [eax + esi*4 + 1], cl
mov eax, dword [ebp - 0x5fc]
mov cl, byte [edi + esi*4]
mov byte [eax + esi*4 + 2], cl
mov eax, dword [ebp - 0x5fc]
mov ecx, dword [ebp - 0x628]
cmp dword [eax + esi*4], ecx
jne 0x436bc6
mov byte [eax + esi*4], bl
mov eax, dword [ebp - 0x5fc]
mov byte [eax + esi*4 + 1], bl
mov eax, dword [ebp - 0x5fc]
mov byte [eax + esi*4 + 2], bl
mov eax, dword [ebp - 0x5fc]
mov byte [eax + esi*4 + 3], bl
xor eax, eax
inc eax
mov byte [ebp - 0x5f5], al
inc esi
cmp esi, edx
jl 0x436adb
push edi
call fcn.00460424
mov dword [esp], 0x12c
call fcn.004608a1
mov esi, eax
pop ecx
test esi, esi
je 0x436c06
lea ecx, [esi + 0x1c]
xor eax, eax
mov dword [esi + 0x18], ecx
mov word [ecx], ax
lea eax, [esi + 0xa0]
xor ecx, ecx
mov dword [esi + 0x9c], eax
mov word [eax], cx
jmp 0x436c08
mov esi, ebx
mov eax, dword [ebp - 0x618]
lea ecx, [esi + 0x9c]
mov dword [esi], eax
mov eax, dword [ebp - 0x5fc]
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x608]
mov dword [esi + 0xc], eax
mov eax, dword [ebp - 0x614]
mov dword [esi + 0x10], eax
mov al, byte [ebp - 0x5f5]
mov byte [esi + 0x14], al
mov byte [esi + 0x15], bl
mov dword [esi + 8], ebx
push dword [ebp + 8]
call fcn.00420f36
mov al, byte [ebp - 0x601]
mov ebx, esi
mov byte [esi + 0x16], al
mov eax, dword [ebp - 0x60c]
mov dword [esi + 0x124], eax
xor eax, eax
inc eax
mov dword [esi + 0x128], eax
lea ecx, [ebp - 0x3c4]
call fcn.00420dec
mov eax, ebx
call fcn.00466cbb
ret