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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x54c180
mov eax, dword fs:[0]
push eax
sub esp, 0x314
mov eax, dword [0x5903c4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 0xc]
xor edi, edi
mov dword [ebp - 0x31c], esi
test esi, esi
jne 0x50664d
call fcn.004dfde0
push eax
lea ecx, [ebp - 0xc0]
call fcn.004ea8f0
mov dword [ebp - 4], edi
call fcn.004dfdf0
mov ecx, eax
call fcn.004eb3d0
test al, al
je 0x50651c
push dword [ebp + 8]
lea ecx, [ebp - 0xc0]
call fcn.004eac10
push edi
push 0x80
push 3
push edi
push 1
push connect
lea ecx, [ebp - 0xc0]
call fcn.004eb180
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x2f4], ebx
cmp ebx, 0xffffffff
jne 0x506489
lea ecx, [ebp - 0xc0]
mov dword [ebp - 4], eax
call fcn.004eaa40
jmp 0x50670f
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
test edi, edi
jne 0x5064b7
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call eax
lea ecx, [ebp - 0xc0]
mov dword [ebp - 4], 0xffffffff
call fcn.004eaa40
jmp 0x50670f
push edi
mov dword [ebp - 0x318], 0
call fcn.0051a102
add esp, 4
mov ebx, eax
lea eax, [ebp - 0x318]
push 0
push eax
push edi
push ebx
push dword [ebp - 0x2f4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x2f4]
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
cmp dword [ebp - 0x318], edi
je 0x506636
push ebx
call fcn.00519ecb
add esp, 4
lea ecx, [ebp - 0xc0]
mov dword [ebp - 4], 0xffffffff
call fcn.004eaa40
jmp 0x50670f
call fcn.004dfdf0
push eax
lea ecx, [ebp - 0xc0]
call fcn.004eabf0
call fcn.004e0020
test al, al
je 0x50653d
call fcn.004dfe00
jmp 0x506555
push 2
push 0
lea ecx, [ebp - 0xc0]
call fcn.004eb180
push eax
call fcn.00507770
add esp, 0xc
mov dword [ebp - 0x2f4], eax
test eax, eax
jne 0x506576
lea ecx, [ebp - 0xc0]
mov dword [ebp - 4], 0xffffffff
call fcn.004eaa40
jmp 0x50670f
lea ecx, [ebp - 0x2f0]
push ecx
lea ecx, [ebp - 0x310]
push ecx
push 1
push dword [ebp + 8]
push eax
call fcn.00507080
add esp, 0x14
test eax, eax
je 0x5065ad
lea ecx, [ebp - 0xc0]
mov dword [ebp - 4], 0xffffffff
call fcn.004eaa40
jmp 0x50670f
mov edi, dword [ebp - 0xc4]
test edi, edi
jne 0x5065ce
lea ecx, [ebp - 0xc0]
mov dword [ebp - 4], 0xffffffff
call fcn.004eaa40
jmp 0x50670f
push edi
call fcn.0051a102
push 3
push edi
mov ebx, eax
push ebx
push dword [ebp - 0x310]
push dword [ebp - 0x2f4]
call fcn.00507c00
add esp, 0x18
test eax, eax
je 0x50661f
cmp eax, 0x600
je 0x50661f
push ebx
call fcn.00519ecb
add esp, 4
call fcn.004e0020
test al, al
jne 0x506505
push dword [ebp - 0x2f4]
call fcn.00506e60
jmp 0x506502
call fcn.004e0020
test al, al
jne 0x506636
push dword [ebp - 0x2f4]
call fcn.00506e60
add esp, 4
lea ecx, [ebp - 0xc0]
mov dword [ebp - 4], 0xffffffff
call fcn.004eaa40
jmp 0x506707
mov ecx, str.COLOR
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x50667a
test dx, dx
je 0x506676
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x50667a
add eax, 4
add ecx, 4
test dx, dx
jne 0x506654
xor eax, eax
jmp 0x50667f
sbb eax, eax
or eax, 1
test eax, eax
jne 0x50668b
lea ebx, [eax + 1]
jmp 0x5067ba
push esi
push dword [ebp + 8]
call fcn.004dfdd0
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebx, eax
mov dword [ebp - 0x304], ebx
test ebx, ebx
je 0x50670f
push ebx
call fcn.004dfdd0
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x310], eax
push ebx
test eax, eax
jne 0x5066c7
call dword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x50670f
call fcn.004dfdd0
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
test edi, edi
je 0x50670f
push edi
call fcn.0051a102
add esp, 4
mov ebx, eax
push edi
push dword [ebp - 0x310]
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push ebx
call fcn.0051d9c0
add esp, 0xc
push dword [ebp - 0x304]
call dword [sym.imp.KERNEL32.dll_FreeResource]
test ebx, ebx
jne 0x5067ba
push 0
push 0x80
push 3
push 0
push 1
push connect
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x2f4], ebx
cmp ebx, 0xffffffff
je 0x50674d
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
test edi, edi
jne 0x50676b
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00519876
mov esp, ebp
pop ebp
ret
push edi
mov dword [ebp - 0x304], 0
call fcn.0051a102
add esp, 4
mov ebx, eax
lea eax, [ebp - 0x304]
push 0
push eax
push edi
push ebx
push dword [ebp - 0x2f4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x2f4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x304], edi
je 0x5067b6
push ebx
call fcn.00519ecb
add esp, 4
jmp 0x50674d
test ebx, ebx
je 0x50674d
mov dword [ebp - 0x2f4], 0
mov dword [ebp - 0x308], 1
mov dword [ebp - 0x30c], 1
test esi, esi
je 0x506812
mov ecx, str.COLOR
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x506809
test dx, dx
je 0x506805
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x506809
add eax, 4
add ecx, 4
test dx, dx
jne 0x5067e3
xor eax, eax
jmp 0x50680e
sbb eax, eax
or eax, 1
test eax, eax
je 0x506851
push 4
lea eax, [ebp - 0x320]
push eax
lea eax, [ebp - 0x30c]
push eax
lea eax, [ebp - 0x308]
push eax
push edi
push ebx
call fcn.00519510
mov edi, eax
push ebx
mov dword [ebp - 0x2f4], edi
call fcn.00519ecb
add esp, 0x1c
test edi, edi
je 0x50674d
mov ebx, dword [ebp - 0x30c]
jmp 0x506856
mov ebx, 1
push 0x2c
lea eax, [ebp - 0x3c]
push 0
push eax
call fcn.0051df40
mov ecx, dword [ebp - 0x308]
add esp, 0xc
mov eax, ebx
mov dword [ebp - 0x3c], 0x28
neg eax
imul ebx, ecx
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x2fc]
push 0
push 0
push eax
push 0
shl ebx, 2
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x28], ebx
xor bl, bl
push eax
push 0
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x30], 0x200001
mov dword [ebp - 0x2c], 0
mov byte [ebp - 0x2f5], bl
mov dword [ebp - 0x2fc], 0
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov dword [ebp - 0x304], eax
test eax, eax
je 0x50674d
xor eax, eax
mov byte [ebp - 0x300], bl
mov word [ebp - 0x2ff], ax
mov byte [ebp - 0x2fd], al
test esi, esi
je 0x506986
mov ecx, str.COLOR
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x506917
test dx, dx
je 0x506913
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x506917
add eax, 4
add ecx, 4
test dx, dx
jne 0x5068f1
xor eax, eax
jmp 0x50691c
sbb eax, eax
or eax, 1
test eax, eax
jne 0x506986
mov dword [ebp - 0x310], eax
mov eax, dword [ebp + 8]
cmp word [eax], 0x23
jne 0x506936
push eax
call dword [sym.imp.USER32.dll_CharNextW]
push 0x10
lea ecx, [ebp - 0x310]
push ecx
push eax
call fcn.0052d4b1
mov dword [ebp - 0x318], eax
lea edx, [ebp - 0x300]
mov cl, byte [ebp - 0x315]
add esp, 0xc
mov byte [ebp - 0x2fe], al
mov al, byte [ebp - 0x317]
mov byte [ebp - 0x2ff], al
mov al, byte [ebp - 0x316]
mov byte [ebp - 0x2fd], cl
mov byte [ebp - 0x300], al
mov dword [ebp - 0x2f4], edx
jmp 0x50698c
mov edx, dword [ebp - 0x2f4]
mov eax, dword [ebp - 0x30c]
xor edi, edi
imul eax, dword [ebp - 0x308]
test eax, eax
jle 0x506abb
mov esi, dword [ebp + 0x10]
nop word [eax + eax]
mov eax, dword [ebp - 0x2fc]
mov cl, byte [edx + edi*4 + 3]
mov byte [eax + edi*4 + 3], cl
mov eax, dword [ebp - 0x2fc]
cmp byte [eax + edi*4 + 3], 0xff
lea ebx, [eax + edi*4]
jae 0x506a3e
movzx eax, byte [edx + edi*4 + 3]
movzx ecx, byte [edx + edi*4 + 2]
imul ecx, eax
mov eax, 0x80808081
mul ecx
shr edx, 7
mov byte [ebx], dl
mov ebx, dword [ebp - 0x2f4]
movzx eax, byte [ebx + edi*4 + 3]
movzx ecx, byte [ebx + edi*4 + 1]
imul ecx, eax
mov eax, 0x80808081
mul ecx
mov eax, dword [ebp - 0x2fc]
shr edx, 7
mov byte [eax + edi*4 + 1], dl
movzx eax, byte [ebx + edi*4 + 3]
movzx ecx, byte [ebx + edi*4]
mov bl, 1
imul ecx, eax
mov eax, 0x80808081
mov byte [ebp - 0x2f5], bl
mul ecx
mov eax, dword [ebp - 0x2fc]
shr edx, 7
mov byte [eax + edi*4 + 2], dl
mov edx, dword [ebp - 0x2f4]
jmp 0x506a67
mov al, byte [edx + edi*4 + 2]
mov byte [ebx], al
mov eax, dword [ebp - 0x2fc]
movzx ecx, byte [edx + edi*4 + 1]
mov bl, byte [ebp - 0x2f5]
mov byte [eax + edi*4 + 1], cl
mov eax, dword [ebp - 0x2fc]
movzx ecx, byte [edx + edi*4]
mov byte [eax + edi*4 + 2], cl
mov eax, dword [ebp - 0x2fc]
cmp dword [eax + edi*4], esi
jne 0x506a9f
mov byte [eax + edi*4], 0
mov bl, 1
mov eax, dword [ebp - 0x2fc]
mov byte [ebp - 0x2f5], bl
mov byte [eax + edi*4 + 1], 0
mov eax, dword [ebp - 0x2fc]
mov byte [eax + edi*4 + 2], 0
mov eax, dword [ebp - 0x2fc]
mov byte [eax + edi*4 + 3], 0
mov eax, dword [ebp - 0x30c]
inc edi
imul eax, dword [ebp - 0x308]
cmp edi, eax
jl 0x5069b0
mov esi, dword [ebp - 0x31c]
test esi, esi
je 0x506af3
mov eax, str.COLOR
mov cx, word [esi]
cmp cx, word [eax]
jne 0x506aea
test cx, cx
je 0x506ae6
mov cx, word [esi + 2]
cmp cx, word [eax + 2]
jne 0x506aea
add esi, 4
add eax, 4
test cx, cx
jne 0x506ac4
xor eax, eax
jmp 0x506aef
sbb eax, eax
or eax, 1
test eax, eax
je 0x506afc
push edx
call fcn.00444490
add esp, 4
push 0xa0
call fcn.0051a0cf
mov esi, eax
add esp, 4
mov dword [ebp - 0x31c], esi
mov dword [ebp - 4], 1
test esi, esi
je 0x506b26
lea ecx, [esi + 0x18]
call fcn.004ea950
jmp 0x506b28
xor esi, esi
mov eax, dword [ebp - 0x304]
mov dword [esi], eax
mov eax, esi
mov ecx, dword [ebp - 0x2fc]
mov dword [esi + 4], ecx
mov ecx, dword [ebp - 0x308]
mov dword [esi + 0xc], ecx
mov ecx, dword [ebp - 0x30c]
mov dword [esi + 0x10], ecx
mov byte [esi + 0x14], bl
mov byte [esi + 0x15], 0
mov dword [esi + 8], 0
jmp 0x50674f