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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e7f16
mov eax, dword fs:[0]
push eax
sub esp, 0x40c
mov eax, dword [0x526060]
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 0x46f2db
call fcn.004517c0
push eax
lea ecx, [ebp - 0xc0]
call fcn.00458020
mov dword [ebp - 4], edi
call fcn.004517e0
mov ecx, eax
call fcn.00458b90
test al, al
je 0x46f130
push dword [ebp + 8]
lea ecx, [ebp - 0xc0]
call fcn.00458370
push edi
push 0x80
push 3
push edi
push 1
push closesocket
lea ecx, [ebp - 0xc0]
call fcn.00458900
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x46f0ae
lea ecx, [ebp - 0xc0]
mov dword [ebp - 4], eax
call fcn.004581b0
jmp 0x46f350
mov edi, dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
push ebx
call edi
mov esi, eax
test esi, esi
jne 0x46f0d6
lea ecx, [ebp - 0xc0]
mov dword [ebp - 4], 0xffffffff
call fcn.004581b0
jmp 0x46f356
push esi
mov dword [ebp - 0x408], 0
call fcn.00413112
add esp, 4
mov edi, eax
lea eax, [ebp - 0x408]
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 - 0x408], esi
je 0x46f2c7
push edi
call fcn.0041310d
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call fcn.004581b0
jmp 0x46f350
call fcn.004517e0
push eax
lea ecx, [ebp - 0xc0]
call fcn.00458350
call fcn.00451800
push eax
lea ecx, [ebp - 0x1c8]
call fcn.00458020
mov byte [ebp - 4], 1
call fcn.00451b80
test al, al
je 0x46f168
call fcn.004517f0
mov ebx, eax
jmp 0x46f1a4
push 0
lea ecx, [ebp - 0x1c8]
call fcn.00458900
push eax
call fcn.00485810
add esp, 8
lea ecx, [ebp - 0xc0]
mov esi, eax
push esi
call fcn.00458900
push eax
call fcn.00460e30
add esp, 8
mov ebx, eax
test esi, esi
je 0x46f1a4
push esi
call fcn.0041310d
add esp, 4
test ebx, ebx
jne 0x46f1ca
lea ecx, [ebp - 0x1c8]
call fcn.004581b0
lea ecx, [ebp - 0xc0]
mov dword [ebp - 4], 0xffffffff
call fcn.004581b0
jmp 0x46f350
push 0xffffffffffffffff
push dword [ebp + 8]
lea ecx, [ebp - 0x144]
mov dword [ebp - 0x404], 0
call fcn.00458050
push 0x4f6da8
push 0x515274
lea ecx, [ebp - 0x144]
mov byte [ebp - 4], 2
call fcn.00458de0
lea eax, [ebp - 0x3f8]
push eax
lea eax, [ebp - 0x404]
push eax
push 1
lea ecx, [ebp - 0x144]
call fcn.00458900
push eax
push ebx
call fcn.004606f0
add esp, 0x14
test eax, eax
je 0x46f236
lea ecx, [ebp - 0x144]
call fcn.004581b0
jmp 0x46f1a8
mov esi, dword [ebp - 0x1cc]
test esi, esi
jne 0x46f250
lea ecx, [ebp - 0x144]
call fcn.004581b0
jmp 0x46f1a8
push esi
call fcn.00413112
push esi
mov edi, eax
push edi
push dword [ebp - 0x404]
push ebx
call fcn.00461380
add esp, 0x14
test eax, eax
je 0x46f29f
cmp eax, 0x600
je 0x46f29f
push edi
call fcn.0041310d
add esp, 4
call fcn.00451b80
test al, al
jne 0x46f28f
push ebx
call fcn.00460410
add esp, 4
lea ecx, [ebp - 0x144]
call fcn.004581b0
jmp 0x46f1a8
call fcn.00451b80
test al, al
jne 0x46f2b1
push ebx
call fcn.00460410
add esp, 4
lea ecx, [ebp - 0x144]
call fcn.004581b0
lea ecx, [ebp - 0x1c8]
call fcn.004581b0
lea ecx, [ebp - 0xc0]
mov dword [ebp - 4], 0xffffffff
call fcn.004581b0
jmp 0x46f348
test esi, esi
jne 0x46f2e6
call fcn.004517b0
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 0x46f350
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x410], eax
push ebx
test eax, eax
jne 0x46f312
call dword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x46f350
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
test esi, esi
je 0x46f350
push esi
call fcn.00413112
add esp, 4
mov edi, eax
push esi
push dword [ebp - 0x410]
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push edi
call fcn.004c3b10
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
test edi, edi
jne 0x46f3e4
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 0x46f3c2
push 0
push ebx
call edi
mov esi, eax
test esi, esi
je 0x46f3c2
push esi
mov dword [ebp - 0x414], 0
call fcn.00413112
add esp, 4
mov edi, eax
lea eax, [ebp - 0x414]
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 - 0x414], esi
je 0x46f3e0
push edi
call fcn.0041310d
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.00412b06
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x46f3c2
push 4
lea eax, [ebp - 0x40c]
push eax
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x418]
push eax
push esi
push edi
call fcn.0047b300
mov ebx, eax
push edi
mov dword [ebp - 0x40c], ebx
call fcn.0041310d
add esp, 0x1c
test ebx, ebx
je 0x46f3c2
push 0x2c
lea eax, [ebp - 0x3c]
push 0
push eax
call fcn.004c4090
mov edi, dword [ebp - 0x418]
add esp, 0xc
mov eax, dword [ebp - 0x410]
mov ebx, edi
imul ebx, dword [ebp - 0x410]
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 - 0x3f9], 0
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x400]
push eax
push 0
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x400], 0
push eax
push 0
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov dword [ebp - 0x408], eax
test eax, eax
je 0x46f3c2
xor esi, esi
test ebx, ebx
jle 0x46f5b3
mov edx, dword [ebp - 0x40c]
add edx, 3
mov dword [ebp - 0x404], edx
nop dword [eax]
nop dword [eax + eax]
mov eax, dword [ebp - 0x400]
mov cl, byte [edx + esi*4]
mov byte [eax + esi*4 + 3], cl
mov eax, dword [ebp - 0x400]
cmp byte [eax + esi*4 + 3], 0xff
lea edi, [eax + esi*4]
jae 0x46f546
movzx eax, byte [edx + esi*4]
movzx ecx, byte [edx + esi*4 - 1]
imul ecx, eax
mov eax, 0x80808081
mov byte [ebp - 0x3f9], 1
mul ecx
shr edx, 7
mov byte [edi], dl
mov edi, dword [ebp - 0x404]
movzx eax, byte [edi + esi*4]
movzx ecx, byte [edi + esi*4 - 2]
imul ecx, eax
mov eax, 0x80808081
mul ecx
mov eax, dword [ebp - 0x400]
shr edx, 7
mov byte [eax + esi*4 + 1], dl
movzx eax, byte [edi + esi*4]
movzx ecx, byte [edi + esi*4 - 3]
imul ecx, eax
mov eax, 0x80808081
mul ecx
mov eax, dword [ebp - 0x400]
shr edx, 7
mov byte [eax + esi*4 + 2], dl
mov edx, edi
jmp 0x46f56a
mov al, byte [edx + esi*4 - 1]
mov byte [edi], al
mov eax, dword [ebp - 0x400]
movzx ecx, byte [edx + esi*4 - 2]
mov byte [eax + esi*4 + 1], cl
mov eax, dword [ebp - 0x400]
movzx ecx, byte [edx + esi*4 - 3]
mov byte [eax + esi*4 + 2], cl
mov eax, dword [ebp - 0x400]
mov ecx, dword [ebp + 0x10]
cmp dword [eax + esi*4], ecx
jne 0x46f5a4
mov byte [eax + esi*4], 0
mov eax, dword [ebp - 0x400]
mov byte [ebp - 0x3f9], 1
mov byte [eax + esi*4 + 1], 0
mov eax, dword [ebp - 0x400]
mov byte [eax + esi*4 + 2], 0
mov eax, dword [ebp - 0x400]
mov byte [eax + esi*4 + 3], 0
inc esi
cmp esi, ebx
jl 0x46f4c0
mov edi, dword [ebp - 0x418]
push dword [ebp - 0x40c]
call fcn.00412b50
push 0xa0
call fcn.00412b17
mov esi, eax
add esp, 8
mov dword [ebp - 0x40c], esi
mov dword [ebp - 4], 3
test esi, esi
je 0x46f5e8
lea ecx, [esi + 0x18]
call fcn.00458080
jmp 0x46f5ea
xor esi, esi
mov eax, dword [ebp - 0x408]
mov dword [esi], eax
mov eax, dword [ebp - 0x410]
mov dword [esi + 0x10], eax
mov al, byte [ebp - 0x3f9]
mov byte [esi + 0x14], al
mov eax, esi
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], edi
jmp 0x46f3c4