Function at 0x10006fc6
Capabilities:
Get file size
Read file on windows

Disassembly:
push 0x404
mov eax, 0x10084dc5
call fcn.10083aac
mov edx, dword [ebp + 8]
xor esi, esi
cmp edx, esi
je 0x10007295
mov ecx, dword [0x10368318]
xor eax, eax
cmp ecx, esi
jle 0x10007000
cmp dword [eax*4 + 0x103675f8], edx
je 0x10007096
inc eax
cmp eax, ecx
jl 0x10006fee
push 0x10111b20
lea eax, [ebp - 0x3f8]
push str._sMap__NoMap.JPG
push eax
mov dword [0x10342a04], 0xfffff600
mov dword [0x10342a08], 0xa00
mov dword [0x10342a0c], 0x10
call dword [sym.imp.MSVCR100.dll_sprintf]
add esp, 0xc
mov eax, dword [0x10356d94]
cmp eax, esi
je 0x10007064
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [0x100a6c80]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push dword [0x100a6c7c]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [0x10356d94], esi
push esi
push pe_nt_image_headers32
push 3
push esi
push 1
push closesocket
lea eax, [ebp - 0x3f8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x10007111
push 0x1008c7e4
jmp 0x1000728f
mov ecx, dword [eax*4 + 0x10367738]
mov edi, dword [sym.imp.MSVCR100.dll_sprintf]
push edx
mov dword [0x10342a04], ecx
mov ecx, dword [eax*4 + 0x10367878]
mov eax, dword [eax*4 + 0x10367af8]
mov ebx, 0x10111b20
push ebx
mov dword [0x10342a0c], eax
lea eax, [ebp - 0x3f8]
push str._sMap___d.JPG
push eax
mov dword [0x10342a08], ecx
call edi
lea eax, [ebp - 0x3f8]
push 0x1008c7d0
push eax
call dword [sym.imp.MSVCR100.dll_fopen]
add esp, 0x18
cmp eax, esi
jne 0x10007104
push ebx
lea eax, [ebp - 0x3f8]
push str._sMap__NoMap.JPG
push eax
call edi
jmp 0x10007035
push eax
call dword [sym.imp.MSVCR100.dll_fclose]
pop ecx
jmp 0x10007038
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0xffffffff
jne 0x1000712a
push 0x1008c7c0
jmp 0x1000728f
push edi
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [0x100a6c7c], eax
cmp eax, esi
jne 0x10007146
push 0x1008c7b0
jmp 0x1000728f
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
cmp eax, esi
jne 0x1000715b
push 0x1008c7a0
jmp 0x1000728f
push esi
lea ecx, [ebp - 0x3fc]
push ecx
push edi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1000717a
push 0x1008c790
jmp 0x1000728f
push dword [0x100a6c7c]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x100a6c80
push 1
push dword [0x100a6c7c]
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
jne 0x1000728a
push 0x10356d94
push 0x1009ebb8
push 1
push edi
push dword [0x100a6c80]
call dword [sym.imp.OLEAUT32.dll_OleCreatePictureIndirect]
cmp eax, esi
je 0x100071ec
mov eax, dword [0x100a6c80]
mov dword [0x10356d94], esi
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push dword [0x100a6c7c]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push 0x1008c780
jmp 0x1000728f
mov eax, dword [0x10356d94]
cmp eax, esi
jne 0x10007213
mov eax, dword [0x100a6c80]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push dword [0x100a6c7c]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push 0x1008c770
jmp 0x1000728f
mov ecx, dword [eax]
push 0x100a6c3c
push eax
call dword [ecx + 0x18]
mov eax, dword [0x10356d94]
mov ecx, dword [eax]
push 0x100a6c38
push eax
call dword [ecx + 0x1c]
push 0x103ad018
lea ecx, [ebp - 0x410]
call sub.mfc100.dll_Ordinal_341
mov ecx, dword [0x100a6c38]
mov eax, dword [0x10356d94]
mov edx, dword [eax]
push esi
mov edi, ecx
neg edi
push edi
push dword [0x100a6c3c]
mov dword [ebp - 4], esi
push ecx
push esi
mov ecx, 0x140
push ecx
push ecx
push 5
push 5
push dword [ebp - 0x40c]
push eax
call dword [edx + 0x20]
mov eax, dword [ebp + 8]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x410]
mov dword [0x10342a5c], eax
call sub.mfc100.dll_Ordinal_917
jmp 0x10007295
push 0x1008c760
call fcn.10006dd0
pop ecx
call fcn.10083b2f
ret