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

Disassembly:
push 0x41c
mov eax, 0x529492
call fcn.004ebc96
mov dword [ebp - 0x428], edx
mov esi, dword [ebp + 0xc]
xor ebx, ebx
test ecx, ecx
jne 0x45fe2a
mov esi, 0x84
lea eax, [ebp - 0xdc]
push esi
push ebx
push eax
call fcn.004eddc0
add esp, 0xc
lea ecx, [ebp - 0xdc]
push 0x579018
call fcn.0044e850
mov dword [ebp - 4], ebx
mov eax, dword [0x578f90]
cmp word [eax], bx
jne 0x45fd04
cmp dword [ebp + 8], ebx
je 0x45fc89
push dword [ebp + 8]
lea ecx, [ebp - 0xdc]
call fcn.0044e8c3
push ebx
push 0x80
push 3
push ebx
push 1
push closesocket
push dword [ebp - 0xdc]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x45fcc0
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xdc]
call fcn.0044e875
jmp 0x45fe9b
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test esi, esi
je 0x45fcac
and dword [ebp - 0x20], 0
push esi
call fcn.004eb2d8
pop ecx
push 0
mov edi, eax
lea eax, [ebp - 0x20]
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 - 0x20], esi
je 0x45fe19
push edi
call fcn.004ead03
pop ecx
jmp 0x45fcac
push eax
lea ecx, [ebp - 0xdc]
call fcn.0044e8c3
push esi
lea eax, [ebp - 0x1ec]
push ebx
push eax
call fcn.004eddc0
add esp, 0xc
lea ecx, [ebp - 0x1ec]
push 0x578f08
call fcn.0044e850
mov byte [ebp - 4], 1
mov ebx, dword [0x57dc00]
test ebx, ebx
jne 0x45fd53
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1ec]
call fcn.0044e875
jmp 0x45fcac
and dword [ebp - 0x20], 0
lea eax, [ebp - 0x164]
push esi
push 0
push eax
call fcn.004eddc0
add esp, 0xc
lea ecx, [ebp - 0x164]
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0044e82c
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x164]
push 0x550df8
push 0x54b8c4
call fcn.0044ec52
mov edx, dword [ebp - 0x164]
lea eax, [ebp - 0x41c]
push eax
lea eax, [ebp - 0x20]
push eax
push ecx
mov ecx, ebx
call fcn.0046a526
add esp, 0xc
test eax, eax
je 0x45fdc6
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x164]
call fcn.0044e875
jmp 0x45fd3f
mov esi, dword [ebp - 0x1f0]
test esi, esi
je 0x45fdb2
push esi
call fcn.004eb2d8
mov edx, dword [ebp - 0x20]
mov edi, eax
push esi
push edi
mov ecx, ebx
call fcn.0046a559
add esp, 0xc
test eax, eax
je 0x45fdfb
cmp eax, 0x600
je 0x45fdfb
push edi
call fcn.004ead03
pop ecx
jmp 0x45fdb2
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x164]
call fcn.0044e875
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1ec]
call fcn.0044e875
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xdc]
call fcn.0044e875
jmp 0x45fe97
test esi, esi
jne 0x45fe3d
mov esi, dword [0x57dc0c]
test esi, esi
cmove esi, dword [0x57dc08]
push ecx
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebx, eax
test ebx, ebx
je 0x45fe9b
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x18], eax
push ebx
test eax, eax
jne 0x45fe66
call dword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x45fe9b
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
test esi, esi
je 0x45fe9b
push esi
call fcn.004eb2d8
pop ecx
push esi
push dword [ebp - 0x18]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push edi
call fcn.004ec860
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
test edi, edi
jne 0x45ff07
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 0x45fefb
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test esi, esi
je 0x45fefb
and dword [ebp - 0x18], 0
push esi
call fcn.004eb2d8
pop ecx
push 0
mov edi, eax
lea eax, [ebp - 0x18]
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 - 0x18], esi
je 0x45ff03
push edi
call fcn.004ead03
pop ecx
xor eax, eax
call fcn.004ebc45
ret
test edi, edi
je 0x45fefb
push ecx
lea eax, [ebp - 0x28]
mov edx, esi
push eax
lea eax, [ebp - 0x1c]
mov ecx, edi
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.00455bf9
push edi
mov ebx, eax
call fcn.004ead03
add esp, 0x14
test ebx, ebx
je 0x45fefb
push 0x2c
lea eax, [ebp - 0x54]
push 0
push eax
call fcn.004eddc0
mov eax, dword [ebp - 0x1c]
add esp, 0xc
mov ecx, dword [ebp - 0x24]
neg eax
mov dword [ebp - 0x4c], eax
xor edx, edx
xor eax, eax
mov dword [ebp - 0x50], ecx
imul ecx, dword [ebp - 0x1c]
inc eax
push 0x20
mov word [ebp - 0x48], ax
pop eax
push edx
push edx
mov word [ebp - 0x46], ax
lea eax, [ebp - 0x420]
push eax
push edx
lea eax, [ebp - 0x54]
shl ecx, 2
push eax
push edx
mov dword [ebp - 0x54], 0x28
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x40], ecx
mov byte [ebp - 0x421], dl
mov dword [ebp - 0x420], edx
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov dword [ebp - 0x18], eax
test eax, eax
je 0x45fefb
mov ecx, dword [ebp - 0x24]
xor esi, esi
imul ecx, dword [ebp - 0x1c]
test ecx, ecx
jle 0x46009e
mov edx, 0xff
mov eax, dword [ebp - 0x420]
mov cl, byte [ebx + esi*4 + 3]
mov byte [eax + esi*4 + 3], cl
mov edi, dword [ebp - 0x420]
cmp byte [edi + esi*4 + 3], dl
jae 0x460028
movzx ecx, byte [ebx + esi*4 + 2]
xor edx, edx
movzx eax, byte [ebx + esi*4 + 3]
imul eax, ecx
mov ecx, 0xff
div ecx
xor edx, edx
mov byte [edi + esi*4], al
mov edi, 0xff
movzx ecx, byte [ebx + esi*4 + 1]
movzx eax, byte [ebx + esi*4 + 3]
imul eax, ecx
mov ecx, dword [ebp - 0x420]
div edi
xor edx, edx
mov byte [ecx + esi*4 + 1], al
movzx ecx, byte [ebx + esi*4]
movzx eax, byte [ebx + esi*4 + 3]
imul eax, ecx
mov ecx, dword [ebp - 0x420]
div edi
xor edx, edx
inc edx
mov byte [ecx + esi*4 + 2], al
mov byte [ebp - 0x421], dl
jmp 0x46004d
mov al, byte [ebx + esi*4 + 2]
xor edx, edx
mov byte [edi + esi*4], al
inc edx
mov eax, dword [ebp - 0x420]
mov cl, byte [ebx + esi*4 + 1]
mov byte [eax + esi*4 + 1], cl
mov eax, dword [ebp - 0x420]
mov cl, byte [ebx + esi*4]
mov byte [eax + esi*4 + 2], cl
mov eax, dword [ebp - 0x420]
mov ecx, dword [ebp - 0x428]
cmp dword [eax + esi*4], ecx
jne 0x460089
mov byte [eax + esi*4], 0
mov eax, dword [ebp - 0x420]
mov byte [ebp - 0x421], dl
mov byte [eax + esi*4 + 1], 0
mov eax, dword [ebp - 0x420]
mov byte [eax + esi*4 + 2], 0
mov eax, dword [ebp - 0x420]
mov byte [eax + esi*4 + 3], 0
mov eax, dword [ebp - 0x24]
inc esi
imul eax, dword [ebp - 0x1c]
mov edx, 0xff
cmp esi, eax
jl 0x45ffb0
push ebx
call fcn.004fc551
pop ecx
push 0xa0
call fcn.004eaf11
mov edx, eax
pop ecx
mov dword [ebp - 0x428], edx
mov dword [ebp - 4], 3
lea ecx, [edx + 0x1c]
xor eax, eax
mov dword [edx + 0x18], ecx
mov word [ecx], ax
or dword [ebp - 4], 0xffffffff
and dword [edx + 4], eax
and dword [edx + 8], eax
mov eax, dword [ebp - 0x18]
mov dword [edx], eax
mov eax, dword [ebp - 0x24]
mov dword [edx + 0xc], eax
mov eax, dword [ebp - 0x1c]
mov dword [edx + 0x10], eax
mov al, byte [ebp - 0x421]
mov byte [edx + 0x14], al
mov eax, edx
jmp 0x45fefd