Function at 0x10039e60
Capabilities:
Check if file exists
Copy file
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x101910c9
mov eax, dword fs:[0]
push eax
sub esp, 0xe8
mov eax, dword [0x101ebb68]
xor eax, esp
mov dword [esp + 0xe0], eax
push ebx
push esi
push edi
mov eax, dword [0x101ebb68]
xor eax, esp
push eax
lea eax, [esp + 0xf8]
mov dword fs:[0], eax
push 0xffffffffffffffff
xor ebx, ebx
mov esi, edx
push ebx
push esi
mov dword [esp + 0x3c], ecx
call fcn.1000bd90
push ebx
lea eax, [esp + 0x84]
push esi
push eax
call dword [sym.imp.MGCore.dll_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____cdecl_MGStringUtil::convertANSIToUnicode_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___enum_MGStringUtil::eSrcCodePage_]
add esp, 0xc
mov dword [esp + 0x100], ebx
mov eax, dword [0x101feda4]
cmp eax, ebx
jne 0x10039ed9
call fcn.10006d40
lea edx, [esp + 0x64]
mov ecx, eax
call fcn.10062280
mov byte [esp + 0x100], 1
cmp dword [esp + 0x74], ebx
jne 0x10039f3c
mov esi, dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
mov edi, 8
cmp dword [esp + 0x78], edi
jb 0x10039f0d
mov ecx, dword [esp + 0x64]
push ecx
call esi
add esp, 4
xor edx, edx
mov dword [esp + 0x78], 7
mov dword [esp + 0x74], ebx
mov word [esp + 0x64], dx
cmp dword [esp + 0x94], edi
jb 0x1003a53f
mov eax, dword [esp + 0x80]
push eax
call esi
jmp 0x1003a53c
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0x84]
push edx
mov edi, 1
mov dword [esp + 0x54], 0x5c
call fcn.10014750
mov esi, eax
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x84]
push ecx
mov dword [esp + 0x2c], 0x2e
call fcn.10014750
sub eax, esi
sub eax, edi
lea ecx, [esi + 1]
push eax
lea esi, [esp + 0xa0]
lea edx, [esp + 0x84]
call fcn.100143f0
push 6
mov eax, str.Temp_
lea ecx, [esp + 0x68]
mov byte [esp + 0x104], 2
call fcn.1000fa50
cmp dword [0x101feda4], ebx
jne 0x10039fb7
call fcn.10006d40
lea edx, [esp + 0x64]
push edx
call fcn.10062d20
push ebx
lea eax, [esp + 0xa0]
push eax
or eax, 0xffffffff
lea esi, [esp + 0x6c]
call fcn.1000aef0
push 0xe
mov eax, str._Thumbnail.png
mov ecx, esi
call fcn.1000fa50
mov eax, dword [esp + 0x80]
mov ebx, 8
cmp dword [esp + 0x94], ebx
jae 0x1003a000
lea eax, [esp + 0x80]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x1003a085
mov edi, dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
cmp dword [esp + 0xb0], ebx
jb 0x1003a027
mov ecx, dword [esp + 0x9c]
push ecx
call edi
add esp, 4
xor edx, edx
mov esi, 7
mov dword [esp + 0xb0], esi
mov dword [esp + 0xac], 0
mov word [esp + 0x9c], dx
cmp dword [esp + 0x78], ebx
jb 0x1003a058
mov eax, dword [esp + 0x64]
push eax
call edi
add esp, 4
xor ecx, ecx
mov dword [esp + 0x78], esi
mov dword [esp + 0x74], 0
mov word [esp + 0x64], cx
cmp dword [esp + 0x94], ebx
jb 0x1003a53f
mov edx, dword [esp + 0x80]
push edx
jmp 0x1003a53a
xor esi, esi
push esi
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x58]
push ecx
mov dword [esp + 0x60], edi
mov dword [esp + 0x64], esi
mov dword [esp + 0x68], esi
mov dword [esp + 0x6c], esi
call dword [sym.imp.gdiplus.dll_GdiplusStartup]
mov eax, dword [esp + 0x80]
cmp dword [esp + 0x94], ebx
jae 0x1003a0bf
lea eax, [esp + 0x80]
lea edx, [esp + 0x34]
push edx
push eax
mov dword [esp + 0x44], vtable.Gdiplus::Bitmap.0
mov dword [esp + 0x3c], esi
call dword [sym.imp.gdiplus.dll_GdipCreateBitmapFromFile]
mov esi, dword [esp + 0x34]
mov dword [esp + 0x44], eax
mov dword [esp + 0x40], esi
lea eax, [esp + 0x18]
push eax
mov byte [esp + 0x104], 3
push esi
mov dword [esp + 0x20], 0
call dword [sym.imp.gdiplus.dll_GdipGetImageWidth]
test eax, eax
je 0x1003a107
mov dword [esp + 0x44], eax
lea ecx, [esp + 0x38]
push ecx
push esi
mov dword [esp + 0x40], 0
call dword [sym.imp.gdiplus.dll_GdipGetImageHeight]
test eax, eax
je 0x1003a123
mov dword [esp + 0x44], eax
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x1003a4c2
mov eax, dword [esp + 0x38]
test eax, eax
je 0x1003a4c2
cmp ecx, 0x30
ja 0x1003a212
cmp eax, 0x30
ja 0x1003a212
mov ecx, dword [esp + 0x64]
cmp dword [esp + 0x78], ebx
jae 0x1003a15b
lea ecx, [esp + 0x64]
mov eax, dword [esp + 0x80]
cmp dword [esp + 0x94], ebx
jae 0x1003a172
lea eax, [esp + 0x80]
push 0
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
cmp eax, edi
jne 0x1003a1e5
push 0
lea edx, [esp + 0x68]
push edx
lea eax, [esp + 0xc0]
push eax
call dword [sym.imp.MGCore.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_MGStringUtil::convertUnicodeToANSI_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const___enum_MGStringUtil::eSrcCodePage_]
add esp, 0xc
mov ecx, dword [esp + 0x30]
push eax
mov byte [esp + 0x104], 4
call fcn.1000b240
lea ecx, [esp + 0xb8]
call fcn.1000c240
push esi
call dword [sym.imp.gdiplus.dll_GdipDisposeImage]
lea esi, [esp + 0x9c]
call fcn.1000ba80
lea esi, [esp + 0x64]
call fcn.1000ba80
lea esi, [esp + 0x80]
call fcn.1000ba80
mov al, 1
jmp 0x1003a541
push esi
call dword [sym.imp.gdiplus.dll_GdipDisposeImage]
lea esi, [esp + 0x9c]
call fcn.1000ba80
lea esi, [esp + 0x64]
call fcn.1000ba80
lea esi, [esp + 0x80]
call fcn.1000ba80
jmp 0x1003a53f
cmp ecx, eax
jne 0x1003a222
mov ecx, 0x30
mov edx, ecx
jmp 0x1003a2cc
jbe 0x1003a279
mov dword [esp + 0x1c], ecx
fild dword [esp + 0x1c]
test ecx, ecx
jns 0x1003a236
fadd qword [0x101b9ff0]
fdivr qword [0x101b9fe8]
mov dword [esp + 0x1c], eax
fild dword [esp + 0x1c]
test eax, eax
jns 0x1003a24e
fadd qword [0x101b9ff0]
fnstcw word [esp + 0x14]
movzx eax, word [esp + 0x14]
fmulp st(1)
or eax, 0xc00
mov dword [esp + 0x1c], eax
mov edx, 0x30
fldcw word [esp + 0x1c]
fistp qword [esp + 0x1c]
mov ecx, dword [esp + 0x1c]
fldcw word [esp + 0x14]
jmp 0x1003a2cc
mov dword [esp + 0x24], eax
fild dword [esp + 0x24]
test eax, eax
jns 0x1003a28b
fadd qword [0x101b9ff0]
fdivr qword [0x101b9fe8]
mov dword [esp + 0x24], ecx
fild dword [esp + 0x24]
test ecx, ecx
jns 0x1003a2a3
fadd qword [0x101b9ff0]
fnstcw word [esp + 0x14]
movzx eax, word [esp + 0x14]
fmulp st(1)
or eax, 0xc00
mov dword [esp + 0x24], eax
mov ecx, 0x30
fldcw word [esp + 0x24]
fistp qword [esp + 0x24]
mov edx, dword [esp + 0x24]
fldcw word [esp + 0x14]
lea eax, [esp + 0x3c]
call fcn.1003b320
mov edi, eax
xor esi, esi
xor bl, bl
cmp edi, esi
je 0x1003a484
test byte [0x10201548], 1
jne 0x1003a321
mov ecx, dword [0x1019788c]
mov edx, dword [0x10197890]
mov eax, dword [0x10197894]
or dword [0x10201548], 1
mov dword [0x101ff538], ecx
mov ecx, dword [0x10197898]
mov dword [0x101ff53c], edx
mov dword [0x101ff540], eax
mov dword [0x101ff544], ecx
call fcn.1003b2b0
test eax, eax
je 0x1003a40c
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x24], esi
call dword [sym.imp.gdiplus.dll_GdipGetImageEncodersSize]
mov esi, dword [esp + 0x1c]
test esi, esi
jne 0x1003a358
mov ecx, dword [esp + 0x40]
push ecx
jmp 0x1003a1e6
push esi
call dword [sym.imp.MSVCR100.dll_malloc]
mov ebx, eax
add esp, 4
mov dword [esp + 0x18], ebx
test ebx, ebx
jne 0x1003a376
mov edx, dword [esp + 0x40]
push edx
jmp 0x1003a1e6
mov eax, dword [esp + 0x14]
push ebx
push esi
push eax
call dword [sym.imp.gdiplus.dll_GdipGetImageEncoders]
xor esi, esi
cmp dword [esp + 0x14], esi
jbe 0x1003a402
add ebx, 0x30
mov edi, edi
mov eax, dword [ebx]
mov ecx, str.image_png
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x1003a3bd
test dx, dx
je 0x1003a3b9
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x1003a3bd
add eax, 4
add ecx, 4
test dx, dx
jne 0x1003a397
xor eax, eax
jmp 0x1003a3c2
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x1003a3d2
inc esi
add ebx, 0x4c
cmp esi, dword [esp + 0x14]
jb 0x1003a390
jmp 0x1003a3fe
imul esi, esi, 0x4c
add esi, dword [esp + 0x18]
mov eax, esi
mov ecx, dword [eax]
mov dword [0x101ff538], ecx
mov edx, dword [eax + 4]
mov dword [0x101ff53c], edx
mov ecx, dword [eax + 8]
mov dword [0x101ff540], ecx
mov edx, dword [eax + 0xc]
mov dword [0x101ff544], edx
mov ebx, dword [esp + 0x18]
push ebx
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
cmp dword [esp + 0x78], 8
mov eax, dword [esp + 0x64]
jae 0x1003a41b
lea eax, [esp + 0x64]
push 0
push 0x101ff538
push eax
mov eax, dword [edi + 4]
push eax
call dword [sym.imp.gdiplus.dll_GdipSaveImageToFile]
test eax, eax
je 0x1003a434
mov dword [edi + 8], eax
push 0
lea ecx, [esp + 0x68]
push ecx
lea edx, [esp + 0xdc]
push edx
call dword [sym.imp.MGCore.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_MGStringUtil::convertUnicodeToANSI_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const___enum_MGStringUtil::eSrcCodePage_]
add esp, 0xc
mov ecx, dword [esp + 0x30]
push eax
mov byte [esp + 0x104], 5
call fcn.1000b240
lea ecx, [esp + 0xd4]
mov byte [esp + 0x100], 3
call fcn.1000c240
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [edi]
mov edx, dword [eax]
push 1
mov ecx, edi
mov bl, 1
call edx
mov eax, dword [esp + 0x50]
push eax
call dword [sym.imp.gdiplus.dll_GdiplusShutdown]
mov ecx, dword [esp + 0x40]
push ecx
call dword [sym.imp.gdiplus.dll_GdipDisposeImage]
lea esi, [esp + 0x9c]
call fcn.1000ba80
lea esi, [esp + 0x64]
call fcn.1000ba80
lea esi, [esp + 0x80]
call fcn.1000ba80
mov al, bl
jmp 0x1003a541
push esi
call dword [sym.imp.gdiplus.dll_GdipDisposeImage]
mov edi, dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
cmp dword [esp + 0xb0], ebx
jb 0x1003a4e5
mov edx, dword [esp + 0x9c]
push edx
call edi
add esp, 4
xor eax, eax
mov esi, 7
mov dword [esp + 0xb0], esi
mov dword [esp + 0xac], 0
mov word [esp + 0x9c], ax
cmp dword [esp + 0x78], ebx
jb 0x1003a516
mov ecx, dword [esp + 0x64]
push ecx
call edi
add esp, 4
xor edx, edx
mov dword [esp + 0x78], esi
mov dword [esp + 0x74], 0
mov word [esp + 0x64], dx
cmp dword [esp + 0x94], ebx
jb 0x1003a53f
mov eax, dword [esp + 0x80]
push eax
call edi
add esp, 4
xor al, al
mov ecx, dword [esp + 0xf8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xe0]
xor ecx, esp
call fcn.10178946
mov esp, ebp
pop ebp
ret