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

Disassembly:
mov eax, 0x1005c
call fcn.004c1c60
mov eax, dword [esp + 0x10070]
mov dword [esp + 0xc], edx
mov dword [esp + 4], 0
push ebx
mov ebx, ecx
push ebp
mov ebp, ebx
push esi
mov esi, dword [esp + 0x10070]
push edi
mov dword [esi], 0xffffffff
test eax, eax
je 0x4ad219
mov byte [eax], 0
cmp byte [ebx], 0
je 0x4ad3ec
mov edi, dword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbsnbicmp]
push 6
push str.hicon:
push ebx
mov byte [esp + 0x27], 0
mov byte [esp + 0x1f], 0
call edi
add esp, 0xc
test eax, eax
je 0x4ad258
push 8
push str.hbitmap:
push ebx
call edi
add esp, 0xc
test eax, eax
jne 0x4ad2fd
mov cl, byte [ebx + 5]
xor ebx, ebx
cmp cl, 0x3a
mov byte [esp + 0x1b], 1
setne bl
xor eax, eax
lea ebx, [ebx*2 + 6]
add ebx, ebp
cmp cl, 0x3a
sete al
mov dword [esi], eax
cmp byte [ebx], 0x2a
sete byte [esp + 0x13]
jne 0x4ad294
mov eax, dword [esp + 0x10080]
inc ebx
test eax, eax
je 0x4ad294
mov byte [eax], 1
mov ecx, ebx
mov al, byte [ecx]
cmp al, 0x20
je 0x4ad2a0
cmp al, 9
jne 0x4ad2a3
inc ecx
jmp 0x4ad296
test al, al
je 0x4ad2e7
cmp al, 0x2d
je 0x4ad2af
cmp al, 0x2b
jne 0x4ad2b6
lea eax, [ecx + 1]
mov ecx, eax
mov al, byte [eax]
cmp al, 0x30
jne 0x4ad2e7
mov al, byte [ecx + 1]
cmp al, 0x78
je 0x4ad2c5
cmp al, 0x58
jne 0x4ad2e7
movsx eax, byte [ecx + 2]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_isxdigit]
add esp, 4
test eax, eax
je 0x4ad2e7
push 0x10
push 0
push ebx
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__strtoi64]
add esp, 0xc
jmp 0x4ad2f1
push ebx
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__atoi64]
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
je 0x4ad3ec
push 0x2e
push ebx
call dword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbsrchr]
mov esi, eax
add esp, 8
test esi, esi
je 0x4ad310
inc esi
mov eax, dword [esp + 0x14]
mov ebp, dword [esp + 0x10070]
mov edi, dword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbsicmp]
test eax, eax
jne 0x4ad386
cmp dword [esp + 0x10078], 1
ja 0x4ad3b4
test esi, esi
je 0x4ad386
push 0x4c9e08
push esi
call edi
add esp, 8
test eax, eax
je 0x4ad3b4
push 0x4cddd4
push esi
call edi
add esp, 8
test eax, eax
je 0x4ad3b4
push 0x4cfe34
push esi
call edi
add esp, 8
test eax, eax
je 0x4ad3b4
push 0x4cfe38
push esi
call edi
add esp, 8
test eax, eax
je 0x4ad3b4
push 0x4cfe3c
push esi
call edi
add esp, 8
test eax, eax
je 0x4ad3b4
mov eax, dword [esp + 0x14]
mov byte [esp + 0x1a], 0
test esi, esi
je 0x4ad446
push 0x4cddd0
push esi
call edi
add esp, 8
test eax, eax
jne 0x4ad3f9
mov eax, dword [esp + 0x10074]
mov dword [eax], 1
jmp 0x4ad442
push dword [esp + 0x10084]
mov eax, dword [esp + 0x10078]
mov ecx, ebx
mov edx, dword [esp + 0x1007c]
push ebp
push dword [esp + 0x24]
mov byte [esp + 0x26], 1
mov dword [eax], 1
call fcn.004ada30
add esp, 0xc
mov dword [esp + 0x14], eax
cmp eax, 2
jae 0x4ad446
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1005c
ret
push 0x4cfe40
push esi
call edi
add esp, 8
test eax, eax
je 0x4ad435
push 0x4cfe44
push esi
call edi
add esp, 8
test eax, eax
je 0x4ad435
push 0x4cfe48
push esi
call edi
add esp, 8
test eax, eax
jne 0x4ad442
mov eax, dword [esp + 0x10074]
mov dword [eax], 0
jmp 0x4ad442
mov eax, dword [esp + 0x10074]
mov dword [eax], 2
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
cmp ecx, 0xffffffff
je 0x4ad458
cmp ebp, 0xffffffff
jne 0x4ad473
test ecx, ecx
je 0x4ad45c
test ebp, ebp
jne 0x4ad469
xor ebp, ebp
mov byte [esp + 0x19], 0
mov dword [esp + 0x1c], ebp
jmp 0x4ad47f
cmp ecx, 0xffffffff
je 0x4ad47a
cmp ebp, 0xffffffff
je 0x4ad47a
mov byte [esp + 0x19], 0
jmp 0x4ad47f
mov byte [esp + 0x19], 1
mov dl, byte [esp + 0x1007c]
xor ecx, ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], edx
test dl, dl
je 0x4ad4bb
push str.gdiplus
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edx, dword [esp + 0x24]
mov ecx, eax
mov dword [esp + 0x20], eax
xor eax, eax
test ecx, ecx
movzx edx, dl
cmove edx, eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x24], edx
mov ecx, dword [esp + 0x10074]
test eax, eax
jne 0x4ad58e
mov edi, dword [ecx]
cmp edi, 0xffffffff
mov dword [esp + 0x2c], edi
mov edi, dword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbsicmp]
jle 0x4ad58e
test dl, dl
jne 0x4ad58e
cmp byte [esp + 0x19], dl
je 0x4ad4f1
xor ecx, ecx
jmp 0x4ad4f7
mov eax, dword [esp + 0x1c]
mov ecx, ebp
push 0x2010
push ecx
push eax
push dword [esp + 0x38]
push ebx
push 0
call dword [sym.imp.USER32.dll_LoadImageA]
mov dword [esp + 0x14], eax
test eax, eax
je 0x4ad52f
cmp byte [esp + 0x19], 0
jne 0x4ad587
cmp dword [esp + 0x10078], 0
jne 0x4ad587
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1005c
ret
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4ad3ec
mov eax, dword [esp + 0x10078]
test eax, eax
jle 0x4ad583
push dword [esp + 0x10084]
mov edx, eax
mov ecx, ebx
push ebp
push dword [esp + 0x24]
call fcn.004ada30
add esp, 0xc
mov dword [esp + 0x14], eax
cmp eax, 2
jb 0x4ad3ec
mov ecx, dword [esp + 0x10074]
mov byte [esp + 0x1a], 1
mov dword [ecx], 1
jmp 0x4ad58e
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10074]
mov dword [esp + 0x28], 0
test eax, eax
jne 0x4ad7f9
mov dword [ecx], eax
cmp byte [esp + 0x24], al
jne 0x4ad5d7
test esi, esi
je 0x4ad5d7
push 0x4cfe54
push esi
call edi
add esp, 8
test eax, eax
je 0x4ad5f2
push str.jpeg
push esi
call edi
add esp, 8
test eax, eax
je 0x4ad5f2
push 0x4cfe60
push esi
call edi
add esp, 8
test eax, eax
je 0x4ad5f2
mov edi, dword [esp + 0x20]
test edi, edi
jne 0x4ad71c
push str.gdiplus
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
jmp 0x4ad5f6
mov edi, dword [esp + 0x20]
test edi, edi
jne 0x4ad71c
push edi
push edi
push 3
push edi
push 1
push connect
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x4ad3ec
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
push 2
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
jne 0x4ad64c
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1005c
ret
push esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
jne 0x4ad672
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1005c
ret
push 0
lea ecx, [esp + 0x28]
push ecx
push dword [esp + 0x2c]
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, [esp + 0x20]
push eax
push 0
push esi
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
js 0x4ad65e
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4ad65e
lea ecx, [esp + 0x28]
push ecx
push 0x4c3b10
push 0
push 0
push eax
call dword [sym.imp.OLEAUT32.dll_OleCreatePictureIndirect]
mov ecx, dword [esp + 0x28]
xor edx, edx
test eax, eax
mov eax, dword [esp + 0x20]
push eax
cmovs ecx, edx
mov dword [esp + 0x2c], ecx
mov ecx, dword [eax]
call dword [ecx + 8]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [esp + 0x28]
test ecx, ecx
je 0x4ad3ec
mov eax, dword [ecx]
lea edx, [esp + 0x14]
push edx
push ecx
call dword [eax + 0xc]
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x4ad7f9
mov eax, dword [esp + 0x28]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1005c
ret
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.GdiplusStartup
push edi
call esi
push str.GdiplusShutdown
push edi
mov dword [esp + 0x34], eax
call esi
push str.GdipCreateBitmapFromFile
push edi
mov dword [esp + 0x54], eax
call esi
push str.GdipCreateHBITMAPFromBitmap
push edi
mov dword [esp + 0x28], eax
call esi
push str.GdipDisposeImage
push edi
mov dword [esp + 0x4c], eax
call esi
mov esi, eax
mov dword [esp + 0x30], 1
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0
test eax, eax
je 0x4ad7ee
push 0
lea ecx, [esp + 0x34]
push ecx
lea ecx, [esp + 0x50]
push ecx
call eax
test eax, eax
jne 0x4ad7ee
push 0x8000
lea eax, [esp + 0x6c]
push eax
push 0xffffffffffffffff
push ebx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x6c]
push eax
call dword [esp + 0x28]
test eax, eax
jne 0x4ad7e6
push 0xff000000
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x2c]
call dword [esp + 0x50]
mov ecx, dword [esp + 0x14]
xor edx, edx
push dword [esp + 0x24]
test eax, eax
cmovne ecx, edx
mov dword [esp + 0x18], ecx
call esi
push dword [esp + 0x48]
call dword [esp + 0x50]
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x14]
cmp byte [esp + 0x19], 0
mov esi, dword [sym.imp.GDI32.dll_DeleteObject]
mov edi, dword [esp + 0x10074]
je 0x4ad8ff
cmp dword [edi], 0
je 0x4ad82e
lea ecx, [esp + 0x30]
push ecx
push eax
call dword [sym.imp.USER32.dll_GetIconInfo]
test eax, eax
je 0x4ad917
mov eax, dword [esp + 0x3c]
lea ecx, [esp + 0x50]
push ecx
push 0x18
push eax
call dword [sym.imp.GDI32.dll_GetObjectA]
cmp ebp, 0xffffffff
jne 0x4ad87b
mov eax, dword [esp + 0x54]
test eax, eax
je 0x4ad8b5
movd xmm1, dword [esp + 0x58]
cvtdq2pd xmm1, xmm1
movd xmm0, eax
cvtdq2pd xmm0, xmm0
divsd xmm1, xmm0
movd xmm0, dword [esp + 0x1c]
cvtdq2pd xmm0, xmm0
mulsd xmm1, xmm0
addsd xmm1, qword [0x4d0a30]
cvttsd2si ebp, xmm1
jmp 0x4ad8b5
mov eax, dword [esp + 0x58]
test eax, eax
je 0x4ad8b5
movd xmm1, dword [esp + 0x54]
movd xmm0, eax
cvtdq2pd xmm1, xmm1
cvtdq2pd xmm0, xmm0
divsd xmm1, xmm0
movd xmm0, ebp
cvtdq2pd xmm0, xmm0
mulsd xmm1, xmm0
addsd xmm1, qword [0x4d0a30]
cvttsd2si eax, xmm1
mov dword [esp + 0x1c], eax
cmp dword [edi], 0
je 0x4ad8fb
push dword [esp + 0x40]
call esi
push dword [esp + 0x3c]
call esi
cmp byte [esp + 0x1a], 0
jne 0x4ad8fb
cmp byte [esp + 0x1b], 0
jne 0x4ad8fb
push dword [esp + 0x14]
call dword [sym.imp.USER32.dll_DestroyIcon]
push 0x10
push ebp
push dword [esp + 0x24]
push dword [edi]
push ebx
push 0
call dword [sym.imp.USER32.dll_LoadImageA]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1005c
ret
mov eax, dword [esp + 0x14]
cmp dword [esp + 0x28], 0
mov edx, dword [esp + 0x1c]
je 0x4ad94a
test edx, edx
jne 0x4ad92e
test ebp, ebp
jne 0x4ad92e
lea ecx, [edx + 4]
jmp 0x4ad930
push dword [esp + 0x14]
call dword [sym.imp.USER32.dll_DestroyIcon]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1005c
ret
xor ecx, ecx
push ecx
push ebp
push edx
push 0
push eax
call dword [sym.imp.USER32.dll_CopyImage]
mov ecx, dword [esp + 0x28]
mov esi, eax
push ecx
mov edx, dword [ecx]
call dword [edx + 8]
jmp 0x4ad99c
mov bl, byte [esp + 0x13]
mov ecx, dword [esp + 0x10080]
test edx, edx
jne 0x4ad97c
test ebp, ebp
jne 0x4ad97c
test bl, bl
je 0x4ad965
test ecx, ecx
je 0x4ad980
cmp dword [esp + 0x10078], 1
jl 0x4ad3ee
cmp dword [edi], 1
je 0x4ad3ee
test bl, bl
je 0x4ad989
neg ecx
sbb ecx, ecx
and ecx, 4
jmp 0x4ad98e
mov ecx, 0xc
push ecx
push ebp
push edx
push dword [edi]
push eax
call dword [sym.imp.USER32.dll_CopyImage]
mov esi, eax
cmp dword [esp + 0x10078], 0
jle 0x4ad9de
cmp dword [edi], 0
jne 0x4ad9de
lea eax, [esp + 0x30]
mov dword [esp + 0x30], 1
push eax
mov dword [esp + 0x40], esi
mov dword [esp + 0x44], esi
call dword [sym.imp.USER32.dll_CreateIconIndirect]
cmp byte [esp + 0x13], 0
mov ebx, eax
jne 0x4ad9d6
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
mov esi, ebx
mov dword [edi], 1
cmp dword [esp + 0x14], esi
je 0x4ad9f2
mov eax, dword [esp + 0x10080]
test eax, eax
je 0x4ad9f2
mov byte [eax], 0
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x1005c
ret