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

Disassembly:
push 0xffffffffffffffff
push 0x470688
mov eax, dword fs:[0]
push eax
sub esp, 0x58
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4878d4]
xor eax, esp
push eax
lea eax, [esp + 0x6c]
mov dword fs:[0], eax
xor ebx, ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x74], ebx
mov dword [esp + 0x18], ebx
mov eax, dword [esp + 0x80]
mov byte [esp + 0x74], 1
cmp eax, ebx
je 0x452ab6
push eax
mov esi, eax
call dword [sym.imp.ole32.dll_StgIsStorageFile]
cmp eax, ebx
jge 0x4529d8
mov eax, dword [esp + 0x18]
mov byte [esp + 0x74], bl
cmp eax, ebx
je 0x4529aa
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [esp + 0x74], 0xffffffff
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x4529c2
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
xor eax, eax
mov ecx, dword [esp + 0x6c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret
lea eax, [esp + 0x1c]
push eax
push ebx
push ebx
push 0x20
push ebx
push esi
call dword [sym.imp.ole32.dll_StgOpenStorage]
cmp eax, ebx
jl 0x452996
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
lea edx, [esp + 0x18]
push edx
push ebx
push ebx
push 0x10
push ebx
push 0x4784d0
push eax
mov eax, dword [ecx + 0x18]
call eax
cmp eax, ebx
jl 0x452996
mov dword [esp + 0x24], ebx
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
lea edx, [esp + 0x24]
push edx
mov edx, dword [esp + 0x80]
push ebx
push 0x10
push ebx
push edx
push eax
mov eax, dword [ecx + 0x10]
mov byte [esp + 0x8c], 2
call eax
cmp eax, ebx
mov eax, dword [esp + 0x24]
jge 0x452a57
mov byte [esp + 0x74], 1
cmp eax, ebx
je 0x452996
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
jmp 0x452996
mov ecx, dword [eax]
lea edx, [esp + 0x38]
push edx
push 2
push ebx
xor ebp, ebp
push ebp
push eax
mov eax, dword [ecx + 0x14]
call eax
mov esi, dword [esp + 0x38]
push esi
call fcn.00459cc6
add esp, 4
push ebx
push ebx
mov edi, eax
mov eax, dword [esp + 0x2c]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x14]
push ebx
push ebp
push eax
call edx
mov eax, dword [esp + 0x24]
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
push ebx
push esi
push edi
push eax
call edx
mov eax, dword [esp + 0x24]
mov byte [esp + 0x74], 1
cmp eax, ebx
je 0x452c03
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
jmp 0x452c03
mov eax, dword [esp + 0x7c]
mov ecx, eax
shr ecx, 0x10
test ecx, ecx
je 0x452b6c
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
or edi, 0xffffffff
cmp ebp, edi
jne 0x452b04
mov eax, dword [esp + 0x18]
mov byte [esp + 0x74], bl
cmp eax, ebx
je 0x452afb
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov dword [esp + 0x74], edi
jmp 0x4529b2
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, ebx
jne 0x452b2f
mov eax, dword [esp + 0x18]
mov byte [esp + 0x74], bl
cmp eax, ebx
je 0x452b26
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [esp + 0x74], edi
jmp 0x4529b2
push esi
mov dword [esp + 0x34], ebx
call fcn.00459cc6
add esp, 4
push ebx
mov edi, eax
lea eax, [esp + 0x34]
push eax
push esi
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x30], esi
je 0x452c03
push edi
call fcn.00459cd1
add esp, 4
jmp 0x452996
mov ecx, dword [esp + 0x84]
push ecx
push eax
call fcn.00433830
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebp, eax
cmp ebp, ebx
jne 0x452ba4
mov eax, dword [esp + 0x18]
mov byte [esp + 0x74], bl
cmp eax, ebx
je 0x4529aa
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
jmp 0x4529aa
push ebp
call fcn.00433830
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [esp + 0x30], eax
push ebp
cmp eax, ebx
jne 0x452bc5
call dword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x452996
call fcn.00433830
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
cmp esi, ebx
je 0x452996
push esi
call fcn.00459cc6
add esp, 4
mov edi, eax
mov eax, dword [esp + 0x30]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push edi
call fcn.0045d210
add esp, 0xc
push ebp
call dword [sym.imp.KERNEL32.dll_FreeResource]
push 4
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x34]
push eax
push esi
push edi
call fcn.0044f640
push edi
mov esi, eax
call fcn.00459cd1
add esp, 0x1c
cmp esi, ebx
je 0x452996
push 0x2c
lea eax, [esp + 0x44]
push ebx
push eax
call fcn.0045cac0
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x50], eax
imul eax, ecx
add esp, 0xc
add eax, eax
push ebx
add eax, eax
push ebx
mov edx, ecx
neg edx
mov dword [esp + 0x5c], eax
lea eax, [esp + 0x28]
push eax
mov dword [esp + 0x54], edx
push ebx
mov edx, 1
lea ecx, [esp + 0x50]
mov word [esp + 0x5c], dx
push ecx
mov edx, 0x20
push ebx
mov dword [esp + 0x58], 0x28
mov word [esp + 0x66], dx
mov dword [esp + 0x68], ebx
mov byte [esp + 0x2f], bl
mov dword [esp + 0x38], ebx
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov ebp, eax
cmp ebp, ebx
je 0x452b87
mov eax, dword [esp + 0x28]
imul eax, dword [esp + 0x2c]
xor ecx, ecx
test eax, eax
jle 0x452d8e
mov eax, dword [esp + 0x20]
add esi, 3
lea ecx, [ecx]
mov dl, byte [esi]
mov byte [eax + ecx*4 + 3], dl
mov edi, dword [esp + 0x20]
cmp byte [edi + ecx*4 + 3], 0xff
jae 0x452d27
movzx eax, byte [esi]
movzx edx, byte [esi - 1]
imul edx, eax
mov eax, 0x80808081
mul edx
shr edx, 7
mov byte [edi + ecx*4], dl
movzx eax, byte [esi]
movzx edx, byte [esi - 2]
imul edx, eax
mov eax, 0x80808081
mul edx
mov eax, dword [esp + 0x20]
shr edx, 7
mov byte [eax + ecx*4 + 1], dl
movzx eax, byte [esi]
movzx edx, byte [esi - 3]
imul edx, eax
mov eax, 0x80808081
mul edx
mov eax, dword [esp + 0x20]
shr edx, 7
mov byte [eax + ecx*4 + 2], dl
mov byte [esp + 0x17], 1
jmp 0x452d45
mov dl, byte [esi - 1]
mov byte [edi + ecx*4], dl
movzx eax, byte [esi - 2]
mov edx, dword [esp + 0x20]
mov byte [edx + ecx*4 + 1], al
movzx eax, byte [esi - 3]
mov edx, dword [esp + 0x20]
mov byte [edx + ecx*4 + 2], al
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x88]
cmp dword [eax + ecx*4], edx
jne 0x452d79
mov byte [eax + ecx*4], bl
mov eax, dword [esp + 0x20]
mov byte [eax + ecx*4 + 1], bl
mov edx, dword [esp + 0x20]
mov byte [edx + ecx*4 + 2], bl
mov eax, dword [esp + 0x20]
mov byte [eax + ecx*4 + 3], bl
mov eax, dword [esp + 0x20]
mov byte [esp + 0x17], 1
mov edx, dword [esp + 0x28]
imul edx, dword [esp + 0x2c]
inc ecx
add esi, 4
cmp ecx, edx
jl 0x452cc0
push 0x10
call fcn.00459c10
mov dl, byte [esp + 0x1b]
mov esi, eax
mov dword [esi], ebp
mov eax, dword [esp + 0x2c]
mov dword [esi + 4], eax
mov ecx, dword [esp + 0x30]
mov dword [esi + 8], ecx
mov byte [esi + 0xc], dl
mov eax, dword [esp + 0x1c]
add esp, 4
mov byte [esp + 0x74], bl
cmp eax, ebx
je 0x452dc5
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x74], 0xffffffff
cmp eax, ebx
je 0x452ddd
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, esi
mov ecx, dword [esp + 0x6c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret