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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x506486
mov eax, dword fs:[0]
push eax
sub esp, 0x4c4
mov eax, dword [0x5655c8]
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 edi, dword [ebp + 0xc]
mov esi, dword [ebp + 0x14]
test edi, edi
jne 0x47102b
call fcn.0044e360
push eax
lea ecx, [ebp - 0xc0]
call fcn.004493e0
mov dword [ebp - 4], edi
call fcn.0044e380
mov ecx, eax
call fcn.0044a5e0
test al, al
je 0x470e80
push dword [ebp + 8]
lea ecx, [ebp - 0xc0]
call fcn.00449bd0
push edi
push 0x80
push 3
push edi
push 1
push closesocket
lea ecx, [ebp - 0xc0]
call fcn.0044a2d0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x470dfe
lea ecx, [ebp - 0xc0]
mov dword [ebp - 4], eax
call fcn.00449610
jmp 0x4710a0
mov edi, dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
push ebx
call edi
mov esi, eax
test esi, esi
jne 0x470e26
lea ecx, [ebp - 0xc0]
mov dword [ebp - 4], 0xffffffff
call fcn.00449610
jmp 0x4710a6
push esi
mov dword [ebp - 0x4cc], 0
call fcn.004fe383
add esp, 4
mov edi, eax
lea eax, [ebp - 0x4cc]
push 0
push eax
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x4cc], esi
je 0x471017
push edi
call fcn.004fe38c
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call fcn.00449610
jmp 0x4710a0
call fcn.0044e380
push eax
lea ecx, [ebp - 0xc0]
call fcn.00449b40
call fcn.0044e3a0
push eax
lea ecx, [ebp - 0x1c8]
call fcn.004493e0
mov byte [ebp - 4], 1
call fcn.0044e790
test al, al
je 0x470eb8
call fcn.0044e390
mov ebx, eax
jmp 0x470ef4
push 0
lea ecx, [ebp - 0x1c8]
call fcn.0044a2d0
push eax
call fcn.00480360
add esp, 8
lea ecx, [ebp - 0xc0]
mov esi, eax
push esi
call fcn.0044a2d0
push eax
call fcn.00460f60
add esp, 8
mov ebx, eax
test esi, esi
je 0x470ef4
push esi
call fcn.004fe38c
add esp, 4
test ebx, ebx
jne 0x470f1a
lea ecx, [ebp - 0x1c8]
call fcn.00449610
lea ecx, [ebp - 0xc0]
mov dword [ebp - 4], 0xffffffff
call fcn.00449610
jmp 0x4710a0
push 0xffffffffffffffff
push dword [ebp + 8]
lea ecx, [ebp - 0x144]
mov dword [ebp - 0x4d0], 0
call fcn.00449410
push 0x51bf94
push 0x51bf98
lea ecx, [ebp - 0x144]
mov byte [ebp - 4], 2
call fcn.0044a970
lea eax, [ebp - 0x4b0]
push eax
lea eax, [ebp - 0x4d0]
push eax
push 1
lea ecx, [ebp - 0x144]
call fcn.004498e0
push eax
push ebx
call fcn.00460550
add esp, 0x14
test eax, eax
je 0x470f86
lea ecx, [ebp - 0x144]
call fcn.00449610
jmp 0x470ef8
mov esi, dword [ebp - 0x284]
test esi, esi
jne 0x470fa0
lea ecx, [ebp - 0x144]
call fcn.00449610
jmp 0x470ef8
push esi
call fcn.004fe383
push esi
mov edi, eax
push edi
push dword [ebp - 0x4d0]
push ebx
call fcn.004615d0
add esp, 0x14
test eax, eax
je 0x470fef
cmp eax, 0x600
je 0x470fef
push edi
call fcn.004fe38c
add esp, 4
call fcn.0044e790
test al, al
jne 0x470fdf
push ebx
call fcn.00460250
add esp, 4
lea ecx, [ebp - 0x144]
call fcn.00449610
jmp 0x470ef8
call fcn.0044e790
test al, al
jne 0x471001
push ebx
call fcn.00460250
add esp, 4
lea ecx, [ebp - 0x144]
call fcn.00449610
lea ecx, [ebp - 0x1c8]
call fcn.00449610
lea ecx, [ebp - 0xc0]
mov dword [ebp - 4], 0xffffffff
call fcn.00449610
jmp 0x471098
test esi, esi
jne 0x471036
call fcn.0044e350
mov esi, eax
push edi
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebx, eax
test ebx, ebx
je 0x4710a0
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x4c4], eax
push ebx
test eax, eax
jne 0x471062
call dword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x4710a0
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
test esi, esi
je 0x4710a0
push esi
call fcn.004fe383
add esp, 4
mov edi, eax
push esi
push dword [ebp - 0x4c4]
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push edi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
test edi, edi
jne 0x471134
mov edi, dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
push 0x80
push 3
push 0
push 1
push closesocket
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x471112
push 0
push ebx
call edi
mov esi, eax
test esi, esi
je 0x471112
push esi
mov dword [ebp - 0x4c0], 0
call fcn.004fe383
add esp, 4
mov edi, eax
lea eax, [ebp - 0x4c0]
push 0
push eax
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x4c0], esi
je 0x471130
push edi
call fcn.004fe38c
add esp, 4
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.004fdfc5
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x471112
lea eax, [esi + edi]
mov dword [ebp - 0x270], 0
mov dword [ebp - 0x1cc], eax
mov dword [ebp - 0x1d4], eax
lea eax, [ebp - 0x4bc]
push 4
push eax
lea eax, [ebp - 0x4c4]
mov dword [ebp - 0x260], 0
push eax
lea eax, [ebp - 0x4c8]
mov dword [ebp - 0x1d0], edi
push eax
lea eax, [ebp - 0x280]
mov dword [ebp - 0x1d8], edi
push eax
call fcn.00479d90
mov ebx, eax
push edi
mov dword [ebp - 0x4bc], ebx
call fcn.004fe38c
add esp, 0x18
test ebx, ebx
je 0x471112
push 0x2c
lea eax, [ebp - 0x3c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov edi, dword [ebp - 0x4c8]
add esp, 0xc
mov eax, dword [ebp - 0x4c4]
mov ebx, edi
imul ebx, dword [ebp - 0x4c4]
neg eax
mov dword [ebp - 0x34], eax
push 0
push 0
mov dword [ebp - 0x3c], 0x28
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x30], 0x200001
mov dword [ebp - 0x2c], 0
lea eax, [ebx*4]
mov byte [ebp - 0x4b1], 0
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x4b8]
push eax
push 0
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x4b8], 0
push eax
push 0
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov dword [ebp - 0x4c0], eax
test eax, eax
je 0x471112
xor esi, esi
test ebx, ebx
jle 0x471335
mov edx, dword [ebp - 0x4bc]
nop dword [eax]
nop word [eax + eax]
mov eax, dword [ebp - 0x4b8]
mov cl, byte [edx + esi*4 + 3]
mov byte [eax + esi*4 + 3], cl
mov eax, dword [ebp - 0x4b8]
cmp byte [eax + esi*4 + 3], 0xff
lea edi, [eax + esi*4]
jae 0x4712c9
movzx eax, byte [edx + esi*4 + 3]
movzx ecx, byte [edx + esi*4 + 2]
imul ecx, eax
mov eax, 0x80808081
mov byte [ebp - 0x4b1], 1
mul ecx
shr edx, 7
mov byte [edi], dl
mov edi, dword [ebp - 0x4bc]
movzx eax, byte [edi + esi*4 + 3]
movzx ecx, byte [edi + esi*4 + 1]
imul ecx, eax
mov eax, 0x80808081
mul ecx
mov eax, dword [ebp - 0x4b8]
shr edx, 7
mov byte [eax + esi*4 + 1], dl
movzx eax, byte [edi + esi*4 + 3]
movzx ecx, byte [edi + esi*4]
imul ecx, eax
mov eax, 0x80808081
mul ecx
mov eax, dword [ebp - 0x4b8]
shr edx, 7
mov byte [eax + esi*4 + 2], dl
mov edx, edi
jmp 0x4712ec
mov al, byte [edx + esi*4 + 2]
mov byte [edi], al
mov eax, dword [ebp - 0x4b8]
movzx ecx, byte [edx + esi*4 + 1]
mov byte [eax + esi*4 + 1], cl
mov eax, dword [ebp - 0x4b8]
movzx ecx, byte [edx + esi*4]
mov byte [eax + esi*4 + 2], cl
mov eax, dword [ebp - 0x4b8]
mov ecx, dword [ebp + 0x10]
cmp dword [eax + esi*4], ecx
jne 0x471326
mov byte [eax + esi*4], 0
mov eax, dword [ebp - 0x4b8]
mov byte [ebp - 0x4b1], 1
mov byte [eax + esi*4 + 1], 0
mov eax, dword [ebp - 0x4b8]
mov byte [eax + esi*4 + 2], 0
mov eax, dword [ebp - 0x4b8]
mov byte [eax + esi*4 + 3], 0
inc esi
cmp esi, ebx
jl 0x471240
mov edi, dword [ebp - 0x4c8]
push dword [ebp - 0x4bc]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
push 0xa0
call fcn.004fd897
mov esi, eax
add esp, 8
mov dword [ebp - 0x4c8], esi
mov dword [ebp - 4], 3
test esi, esi
je 0x47136b
lea ecx, [esi + 0x18]
call fcn.00449440
jmp 0x47136d
xor esi, esi
mov eax, dword [ebp - 0x4c0]
mov dword [esi], eax
mov eax, dword [ebp - 0x4c4]
mov dword [esi + 0x10], eax
mov al, byte [ebp - 0x4b1]
mov byte [esi + 0x14], al
mov eax, esi
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], edi
jmp 0x471114