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

Disassembly:
push 0x404
mov eax, 0x100851b5
call fcn.10083e9c
mov edx, dword [ebp + 8]
xor esi, esi
cmp edx, esi
je 0x10007319
mov ecx, dword [0x10368318]
xor eax, eax
cmp ecx, esi
jle 0x10007084
cmp dword [eax*4 + 0x103675f8], edx
je 0x1000711a
inc eax
cmp eax, ecx
jl 0x10007072
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 0x100070e8
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 0x10007195
push 0x1008c808
jmp 0x10007313
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 0x1008c7f4
push eax
call dword [sym.imp.MSVCR100.dll_fopen]
add esp, 0x18
cmp eax, esi
jne 0x10007188
push ebx
lea eax, [ebp - 0x3f8]
push str._sMap__NoMap.JPG
push eax
call edi
jmp 0x100070b9
push eax
call dword [sym.imp.MSVCR100.dll_fclose]
pop ecx
jmp 0x100070bc
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0xffffffff
jne 0x100071ae
push 0x1008c7e4
jmp 0x10007313
push edi
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [0x100a6c7c], eax
cmp eax, esi
jne 0x100071ca
push 0x1008c7d4
jmp 0x10007313
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
cmp eax, esi
jne 0x100071df
push 0x1008c7c4
jmp 0x10007313
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 0x100071fe
push 0x1008c7b4
jmp 0x10007313
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 0x1000730e
push 0x10356d94
push 0x1009ec98
push 1
push edi
push dword [0x100a6c80]
call dword [sym.imp.OLEAUT32.dll_OleCreatePictureIndirect]
cmp eax, esi
je 0x10007270
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 0x1008c7a4
jmp 0x10007313
mov eax, dword [0x10356d94]
cmp eax, esi
jne 0x10007297
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 0x1008c794
jmp 0x10007313
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 0x10007319
push 0x1008c784
call fcn.10006e54
pop ecx
call fcn.10083f1f
ret