Function at 0x10002d30
Capabilities:
Get common file path

Disassembly:
sub esp, 8
push ebx
push ebp
push esi
mov esi, ecx
push edi
lea edi, [esi + 0x654]
lea ebp, [esi + 0xc]
push edi
push str.File_Type
mov ecx, ebp
call fcn.10004ce0
lea eax, [esi + 0x638]
mov ecx, ebp
push eax
push str.ImageFormat
call fcn.10004ce0
mov eax, dword [edi]
mov ecx, esi
test eax, eax
jne 0x10002d71
call fcn.10003ee0
jmp 0x10002d76
call fcn.100040f0
test ax, ax
jne 0x10003045
mov eax, dword [esi + 0x418]
lea ebp, [esi + 0x42c]
add eax, 0x610
push eax
push ebp
call fcn.1000536c
add esp, 8
push ebp
push 0
push 0x100102f0
push ebp
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea edi, [esi + 4]
push ebp
mov ecx, edi
call fcn.10004610
mov ebx, eax
test bx, bx
je 0x10002dec
mov ecx, dword [esi + 0x640]
mov edi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push ecx
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov edx, dword [esi + 0x640]
push edx
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
pop esi
mov ax, bx
pop ebp
pop ebx
add esp, 8
ret
mov ecx, esi
call fcn.10004280
mov ebx, eax
test bx, bx
je 0x10002e3c
mov eax, dword [esi + 0x640]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalHandle]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov ecx, dword [esi + 0x640]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalHandle]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, edi
call fcn.100046f0
push ebp
mov ecx, edi
call fcn.10004720
pop edi
pop esi
mov ax, bx
pop ebp
pop ebx
add esp, 8
ret
mov eax, dword [esi + 0x638]
cmp eax, 0x418
je 0x10002e6e
mov ecx, dword [esi + 0x420]
cmp eax, 0x7e0
je 0x10002e62
mov eax, dword [ecx + 0x24]
imul eax, dword [ecx + 8]
add eax, 0x1f
jmp 0x10002e81
mov edx, dword [ecx + 8]
lea eax, [edx*8 + 0x1f]
jmp 0x10002e81
mov ecx, dword [esi + 0x420]
mov eax, dword [ecx + 8]
lea eax, [eax + eax*2]
lea eax, [eax*8 + 0x1f]
mov ebx, dword [ecx + 0xc]
push ebp
shr eax, 3
and eax, 0x1ffffffc
mov ecx, edi
imul ebx, eax
call fcn.10004880
mov ecx, eax
and ecx, edx
cmp ecx, 0xffffffff
je 0x10002eed
xor ecx, ecx
cmp edx, ecx
jg 0x10002eed
jl 0x10002eac
cmp eax, ebx
jae 0x10002eed
mov edx, dword [esi + 0x640]
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push edx
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [esi + 0x640]
push eax
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, edi
call fcn.100046f0
push ebp
mov ecx, edi
call fcn.10004720
pop edi
pop esi
pop ebp
mov ax, 0xc9
pop ebx
add esp, 8
ret
xor eax, eax
lea edx, [esp + 0x10]
mov ecx, eax
dec ebx
sar ecx, 0x1f
push 2
push edx
push ebx
mov ecx, edi
mov dword [esp + 0x1c], eax
call fcn.100046c0
push 1
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ebx, eax
test ebx, ebx
jne 0x10002f60
mov eax, dword [esi + 0x640]
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push eax
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov ecx, dword [esi + 0x640]
push ecx
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, edi
call fcn.100046f0
push ebp
mov ecx, edi
call fcn.10004720
pop edi
pop esi
pop ebp
or ax, 0xffff
pop ebx
add esp, 8
ret
push ebx
push 1
mov ecx, edi
mov byte [ebx], 0
call fcn.10004690
test ax, ax
mov dword [esp + 0x14], eax
je 0x10002fd0
mov edx, dword [esi + 0x640]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalHandle]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [esi + 0x640]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, edi
call fcn.100046f0
push ebp
mov ecx, edi
call fcn.10004720
mov ax, word [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalHandle]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalHandle]
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, edi
call fcn.100046f0
lea edi, [esi + 0xc]
push ebp
push str.TempFile
mov ecx, edi
mov dword [esi + 0x634], 0
call fcn.10004c80
mov ecx, dword [esi + 0x634]
push ecx
push str.LoopCount
mov ecx, edi
call fcn.10004d50
mov edx, dword [esi + 0x640]
push edx
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [esi + 0x640]
push eax
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor ax, ax
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret