Function at 0x52b100
Capabilities:
Get common file path

Disassembly:
sub esp, 0x238
pushal
mov esi, eax
cmp dword [esi + 0x159], 0
je 0x52b473
cmp dword [esi + 0x179], 0
jne 0x52b18f
mov eax, dword [esi + 0x159]
cmp dword [eax + 0x19], 0
je 0x52b155
mov eax, dword [esi + 0x165]
push eax
mov eax, dword [esi + 0x159]
mov eax, dword [eax + 0xd]
mov ebx, dword [esi + 0x159]
mov ebx, dword [ebx + 0x19]
mov ecx, dword [esi + 0x15d]
mov edx, dword [esi + 0x161]
call fcn.0052abfc
mov eax, dword [esi + 0x159]
mov eax, dword [eax + 0x41]
and eax, 4
cmp eax, 0
jne 0x52b18f
cmp dword [esi + 0xb2], 0
je 0x52b18f
push 0
mov eax, dword [esi + 0xb2]
mov ebx, dword [esi + 0x159]
mov ebx, dword [ebx + 0x2d]
mov ecx, 0
mov edx, 0
call fcn.0052abfc
cmp dword [esi + 0x159], 0
je 0x52b1a9
mov eax, dword [esi + 0x159]
mov eax, dword [esi + 0x159]
mov ebx, dword [eax]
call dword [ebx + 4]
mov dword [esi + 0x159], 0
cmp dword [esi + 0x179], 0
je 0x52b1dd
mov eax, dword [esi + 0x140]
push eax
call sub.GDI32.dll_CloseMetaFile
push eax
call sub.GDI32.dll_DeleteMetaFile
mov dword [esi + 0x140], 0
jmp 0x52b46d
cmp dword [esi + 0x181], 0
je 0x52b461
mov byte [esp + 0x154], 0
cmp dword [esi + 0x1ca], 0
je 0x52b223
mov eax, dword [esi + 0x171]
call dword [esi + 0x1ca]
call fcn.0042f50f
lea eax, [esp + 0x154]
mov dword [esp + 0x26], eax
mov ebx, 0x104
call fcn.0043508c
jmp 0x52b27b
lea ebx, [esp + 0x3a]
push ebx
push 0x104
call sub.KERNEL32.dll_GetTempPathA
lea edi, [esp + 0x154]
mov dword [esp + 0x26], edi
push edi
push 0
push 0x56a420
push ebx
call sub.KERNEL32.dll_GetTempFileNameA
mov eax, 8
call fcn.004c51f0
mov ecx, eax
cmp ecx, 0
je 0x52b26e
mov eax, edi
mov ebx, ecx
mov dword [ebx], fcn.0052d200
call fcn.004f5ef0
mov dword [ebx + 4], eax
lea ebx, [esi + 0x185]
mov eax, ecx
call fcn.0050b86c
mov eax, dword [esi + 0x140]
push eax
call sub.GDI32.dll_CloseMetaFile
mov edi, eax
mov dword [esi + 0x140], 0
cmp byte [esp + 0x154], 0
je 0x52b459
mov eax, edi
call fcn.0052d068
mov dword [esp + 0x22], eax
mov dword [esp + 0x13e], 0x9ac6cdd7
mov word [esp + 0x142], 0
mov word [esp + 0x144], 0
mov word [esp + 0x146], 0
push 0x58
mov eax, dword [esi + 0x13c]
push eax
call sub.GDI32.dll_GetDeviceCaps
mov dword [esp + 0x2a], eax
push 0x5a
mov eax, dword [esi + 0x13c]
push eax
call sub.GDI32.dll_GetDeviceCaps
mov ebx, eax
mov dword [esp + 0x2e], ebx
cmp dword [esp + 0x2a], ebx
jl 0x52b360
mov ebx, dword [esp + 0x2a]
mov ax, bx
mov word [esp + 0x14c], ax
push 8
mov eax, dword [esi + 0x13c]
push eax
call sub.GDI32.dll_GetDeviceCaps
mov cx, word [esi + 0xd2]
shl cx, 1
add ax, cx
mov word [esp + 0x148], ax
push 0xa
mov eax, dword [esi + 0x13c]
push eax
call sub.GDI32.dll_GetDeviceCaps
push dword [esp + 0x2e]
push ebx
mov ebx, dword [esi + 0xd6]
shl ebx, 1
add eax, ebx
push eax
call sub.KERNEL32.dll_MulDiv
mov word [esp + 0x14a], ax
jmp 0x52b3bc
mov ax, bx
mov word [esp + 0x14c], ax
push 8
mov eax, dword [esi + 0x13c]
push eax
call sub.GDI32.dll_GetDeviceCaps
push dword [esp + 0x2a]
push ebx
mov ebx, dword [esi + 0xd2]
shl ebx, 1
add eax, ebx
push eax
call sub.KERNEL32.dll_MulDiv
mov word [esp + 0x148], ax
push 0xa
mov eax, dword [esi + 0x13c]
push eax
call sub.GDI32.dll_GetDeviceCaps
mov bx, ax
mov ax, word [esi + 0xd6]
shl ax, 1
add bx, ax
mov word [esp + 0x14a], bx
mov dword [esp + 0x14e], 0
mov ax, word [esp + 0x148]
xor ax, 0x5711
xor ax, word [esp + 0x14a]
xor ax, word [esp + 0x14c]
mov word [esp + 0x152], ax
cmp dword [esi + 0x17d], 0
je 0x52b403
mov eax, dword [esi + 0x17d]
mov ebx, dword [esp + 0x26]
call fcn.00479088
push 0x11
push dword [esp + 0x2a]
call sub.KERNEL32.dll__lopen
mov dword [esp + 0x36], eax
push 0x16
lea ebx, [esp + 0x142]
push ebx
push eax
call sub.KERNEL32.dll__lwrite
mov ebx, dword [esp + 0x22]
push ebx
call sub.KERNEL32.dll_GlobalLock
mov dword [esp + 0x32], eax
push ebx
call sub.KERNEL32.dll_GlobalSize
push eax
push dword [esp + 0x36]
push dword [esp + 0x3e]
call sub.KERNEL32.dll__hwrite
push dword [esp + 0x36]
call sub.KERNEL32.dll__lclose
push ebx
call sub.KERNEL32.dll_GlobalUnlock
push ebx
call sub.KERNEL32.dll_GlobalFree
push edi
call sub.GDI32.dll_DeleteMetaFile
jmp 0x52b46d
mov eax, dword [esi + 0x13c]
push eax
call sub.GDI32.dll_EndPage
inc dword [esi + 0x171]
popal
add esp, 0x238
ret