Function at 0x438152
Capabilities:
Check if file exists
Get file attributes
Get file size
Link many functions at runtime
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x25c
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0x14]
or dword [esi], 0xffffffff
xor ebx, ebx
cmp byte [eax], bl
mov dword [ebp - 0xc], ebx
jne 0x438176
xor eax, eax
jmp 0x43869d
cmp dword [ebp + 0x18], ebx
jge 0x43817e
mov dword [ebp + 0x18], ebx
push 0x2e
push eax
call dword [sym.imp.MSVCR71.dll_strrchr]
cmp eax, ebx
pop ecx
pop ecx
mov dword [ebp - 4], eax
je 0x438193
inc dword [ebp - 4]
push edi
xor edi, edi
inc edi
cmp dword [ebp + 0x18], edi
jg 0x438214
cmp dword [ebp - 4], ebx
je 0x438205
push 0x457004
push dword [ebp - 4]
call dword [sym.imp.MSVCR71.dll__stricmp]
test eax, eax
pop ecx
pop ecx
je 0x438214
push 0x457000
push dword [ebp - 4]
call dword [sym.imp.MSVCR71.dll__stricmp]
test eax, eax
pop ecx
pop ecx
je 0x438214
push 0x45883c
push dword [ebp - 4]
call dword [sym.imp.MSVCR71.dll__stricmp]
test eax, eax
pop ecx
pop ecx
je 0x438214
push 0x458838
push dword [ebp - 4]
call dword [sym.imp.MSVCR71.dll__stricmp]
test eax, eax
pop ecx
pop ecx
je 0x438214
push 0x458834
push dword [ebp - 4]
call dword [sym.imp.MSVCR71.dll__stricmp]
test eax, eax
pop ecx
pop ecx
je 0x438214
cmp dword [ebp + 0x18], ebx
mov byte [ebp - 0xd], bl
jle 0x438245
mov dword [esi], edi
jmp 0x43829e
mov eax, dword [ebp + 0x18]
cmp eax, ebx
mov byte [ebp - 0xd], 1
mov dword [esi], edi
jle 0x438224
dec eax
jmp 0x438226
xor eax, eax
push eax
push dword [ebp + 8]
push dword [0x45d9c4]
call dword [sym.imp.SHELL32.dll_ExtractIconA]
cmp eax, 2
mov dword [ebp - 0xc], eax
jae 0x43829e
xor eax, eax
jmp 0x43869c
cmp dword [ebp - 4], ebx
je 0x43829e
push 0x457008
push dword [ebp - 4]
call dword [sym.imp.MSVCR71.dll__stricmp]
test eax, eax
pop ecx
pop ecx
je 0x43820d
mov edi, dword [sym.imp.MSVCR71.dll__stricmp]
push 0x458830
push dword [ebp - 4]
call edi
test eax, eax
pop ecx
pop ecx
je 0x438298
push 0x45882c
push dword [ebp - 4]
call edi
test eax, eax
pop ecx
pop ecx
je 0x438298
push 0x458828
push dword [ebp - 4]
call edi
test eax, eax
pop ecx
pop ecx
jne 0x43829e
mov dword [esi], ebx
jmp 0x43829e
mov dword [esi], 2
or eax, 0xffffffff
cmp dword [ebp + 0xc], eax
je 0x4382ab
cmp dword [ebp + 0x10], eax
jne 0x4382bb
cmp dword [ebp + 0xc], ebx
je 0x4382b5
cmp dword [ebp + 0x10], ebx
jne 0x4382bb
mov dword [ebp + 0x10], ebx
mov dword [ebp + 0xc], ebx
cmp dword [ebp + 0xc], eax
je 0x4382c8
cmp dword [ebp + 0x10], eax
mov byte [ebp - 5], bl
jne 0x4382cc
mov byte [ebp - 5], 1
cmp byte [ebp + 0x1c], bl
mov dword [ebp - 0x14], ebx
je 0x4382e9
push str.gdiplus
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
cmp eax, ebx
mov dword [ebp - 0x14], eax
jne 0x4382e9
mov byte [ebp + 0x1c], bl
cmp dword [ebp - 0xc], ebx
jne 0x438368
mov edx, dword [esi]
cmp edx, 0xffffffff
jle 0x438368
cmp byte [ebp + 0x1c], bl
jne 0x438368
cmp byte [ebp - 5], bl
je 0x438305
xor eax, eax
xor ecx, ecx
jmp 0x43830b
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push 0x2010
push ecx
push eax
push edx
push dword [ebp + 8]
push ebx
call dword [sym.imp.USER32.dll_LoadImageA]
cmp eax, ebx
mov dword [ebp - 0xc], eax
je 0x43832e
cmp byte [ebp - 5], bl
jne 0x438368
jmp 0x43869c
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x43823e
mov eax, dword [ebp + 0x18]
cmp eax, ebx
jle 0x438368
dec eax
push eax
push dword [ebp + 8]
push dword [0x45d9c4]
call dword [sym.imp.SHELL32.dll_ExtractIconA]
cmp eax, 2
mov dword [ebp - 0xc], eax
jb 0x43823e
mov byte [ebp - 0xd], 1
cmp dword [ebp - 0xc], ebx
mov dword [ebp - 0x18], ebx
jne 0x43848e
cmp byte [ebp + 0x1c], bl
mov eax, dword [ebp + 0x14]
mov dword [eax], ebx
jne 0x4383b5
mov edi, dword [ebp - 4]
cmp edi, ebx
je 0x4383b5
mov esi, dword [sym.imp.MSVCR71.dll__stricmp]
push 0x45881c
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x4383c8
push str.jpeg
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x4383c8
push 0x458810
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x4383c8
cmp dword [ebp - 0x14], ebx
jne 0x4383d1
push str.gdiplus
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], ebx
je 0x4384aa
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.GdiplusStartup
push dword [ebp - 0x14]
call esi
push str.GdiplusShutdown
push dword [ebp - 0x14]
mov edi, eax
call esi
push str.GdipCreateBitmapFromFile
push dword [ebp - 0x14]
mov dword [ebp - 0x20], eax
call esi
push str.GdipCreateHBITMAPFromBitmap
push dword [ebp - 0x14]
mov dword [ebp - 0x1c], eax
call esi
push str.GdipDisposeImage
push dword [ebp - 0x14]
mov dword [ebp - 0x28], eax
call esi
cmp edi, ebx
mov esi, eax
mov dword [ebp - 0x38], 1
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], ebx
je 0x438485
push ebx
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x24]
push eax
call edi
test eax, eax
jne 0x438485
push 0x104
lea eax, [ebp - 0x25c]
push eax
push 0xffffffffffffffff
push dword [ebp + 8]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x25c]
push eax
call dword [ebp - 0x1c]
test eax, eax
jne 0x43847f
push 0xff000000
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 4]
call dword [ebp - 0x28]
test eax, eax
je 0x43847a
mov dword [ebp - 0xc], ebx
push dword [ebp - 4]
call esi
push dword [ebp - 0x24]
call dword [ebp - 0x20]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp byte [ebp - 5], bl
mov edi, dword [ebp + 0x14]
je 0x438642
cmp dword [edi], ebx
jne 0x438597
mov eax, dword [ebp - 0xc]
jmp 0x4385af
push ebx
push ebx
push 3
push ebx
push ebx
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x43823e
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
push 2
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
cmp esi, ebx
jne 0x4384ef
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x43823e
push esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
cmp eax, ebx
jne 0x43850d
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x43823e
push ebx
lea ecx, [ebp - 4]
push ecx
push dword [ebp - 4]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x14]
push eax
push ebx
push esi
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
jl 0x438501
cmp dword [ebp - 0x14], ebx
je 0x438501
lea eax, [ebp - 0x18]
push eax
push 0x4516a0
push ebx
push ebx
push dword [ebp - 0x14]
call dword [sym.imp.OLEAUT32.dll_OleCreatePictureIndirect]
test eax, eax
jge 0x43855b
mov dword [ebp - 0x18], ebx
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [ebp - 0x18]
cmp eax, ebx
je 0x43823e
mov ecx, dword [eax]
lea edx, [ebp - 0xc]
push edx
push eax
call dword [ecx + 0xc]
cmp dword [ebp - 0xc], ebx
jne 0x43848e
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x43823e
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.USER32.dll_GetIconInfo]
test eax, eax
je 0x438634
mov eax, dword [ebp - 0x30]
lea ecx, [ebp - 0x54]
push ecx
push 0x18
push eax
call dword [sym.imp.GDI32.dll_GetObjectA]
cmp dword [ebp + 0x10], 0xffffffff
jne 0x4385e0
cmp dword [ebp - 0x50], ebx
je 0x4385fc
fild dword [ebp - 0x4c]
fidiv dword [ebp - 0x50]
fimul dword [ebp + 0xc]
fadd qword [0x458a30]
call fcn.0044ffe0
mov dword [ebp + 0x10], eax
jmp 0x4385fc
cmp dword [ebp - 0x4c], ebx
je 0x4385fc
fild dword [ebp - 0x50]
fidiv dword [ebp - 0x4c]
fimul dword [ebp + 0x10]
fadd qword [0x458a30]
call fcn.0044ffe0
mov dword [ebp + 0xc], eax
cmp dword [edi], ebx
je 0x438642
push dword [ebp - 0x2c]
mov esi, dword [sym.imp.GDI32.dll_DeleteObject]
call esi
push dword [ebp - 0x30]
call esi
cmp byte [ebp - 0xd], bl
jne 0x438642
push dword [ebp - 0xc]
call dword [sym.imp.USER32.dll_DestroyIcon]
push 0x10
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [edi]
push dword [ebp + 8]
push ebx
call dword [sym.imp.USER32.dll_LoadImageA]
jmp 0x43869c
push dword [ebp - 0xc]
call dword [sym.imp.USER32.dll_DestroyIcon]
jmp 0x43823e
cmp dword [ebp - 0x18], ebx
je 0x438676
cmp dword [ebp + 0xc], ebx
jne 0x438656
cmp dword [ebp + 0x10], ebx
jne 0x438656
push 4
pop eax
jmp 0x438658
xor eax, eax
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
push dword [ebp - 0xc]
call dword [sym.imp.USER32.dll_CopyImage]
mov esi, eax
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x43869a
cmp dword [ebp + 0xc], ebx
jne 0x438685
cmp dword [ebp + 0x10], ebx
jne 0x438685
mov eax, dword [ebp - 0xc]
jmp 0x43869c
push 0xc
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [edi]
push dword [ebp - 0xc]
call dword [sym.imp.USER32.dll_CopyImage]
mov esi, eax
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret