Function at 0x56efe0
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x59e6b6
mov eax, dword fs:[0]
push eax
sub esp, 0xac
mov eax, dword [0x5f13cc]
xor eax, esp
mov dword [esp + 0xa8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5f13cc]
xor eax, esp
push eax
lea eax, [esp + 0xc0]
mov dword fs:[0], eax
mov ebp, dword [esp + 0xd4]
mov esi, dword [ebp + 0xc]
cmp esi, 1
mov eax, dword [esp + 0xd0]
mov dword [esp + 0x1c], eax
mov dword [ebp + 0x10], 0
jae 0x56f077
mov edi, esi
test edi, edi
jbe 0x56f057
mov ecx, dword [ebp + 4]
push edi
push ecx
lea edx, [esp + 0x1f]
push edx
call fcn.0057e7b0
add esp, 0xc
mov dword [ebp + 0x10], edi
cmp byte [esp + 0x17], 2
jne 0x56f2ae
mov edi, dword [ebp + 0x10]
cmp edi, esi
ja 0x56f09b
sub esi, edi
cmp esi, 2
jb 0x56f07e
mov esi, 2
jmp 0x56f082
mov edi, 1
jmp 0x56f042
test esi, esi
jbe 0x56f09b
mov eax, dword [ebp + 4]
push esi
add eax, edi
push eax
lea ecx, [esp + 0x20]
push ecx
call fcn.0057e7b0
add esp, 0xc
add edi, esi
mov dword [ebp + 0x10], edi
mov edx, dword [esp + 0x18]
mov ebx, dword [sym.imp.WS2_32.dll_ntohs]
push edx
call ebx
movzx ecx, ax
mov eax, dword [ebp + 0xc]
movzx ecx, cx
cmp ecx, eax
jne 0x56f2ae
xor edx, edx
sub eax, 1
sbb edx, edx
mov dword [esp + 0x28], edx
lea edx, [esp + 0x17]
mov edi, ebp
mov dword [ebp + 0x10], eax
call fcn.004c4280
cmp byte [esp + 0x17], 3
jne 0x56f2ae
mov eax, dword [ebp + 0xc]
add eax, 0xffffffff
push 0
push eax
mov esi, ebp
call fcn.004083b0
lea edx, [esp + 0x18]
mov dword [ebp + 0x10], 3
call fcn.0056fc30
mov eax, dword [esp + 0x18]
push eax
call ebx
lea edx, [esp + 0x18]
call fcn.0056fc30
mov ecx, dword [esp + 0x18]
push ecx
call ebx
movzx eax, ax
cmp ax, 1
jne 0x56f2ae
lea edx, [esp + 0x18]
call fcn.0056fc30
mov edx, dword [esp + 0x18]
push edx
call ebx
movzx eax, ax
cmp ax, 0x21
jne 0x56f2ae
lea edx, [esp + 0x18]
call fcn.004c4240
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.WS2_32.dll_ntohl]
mov esi, dword [esp + 0x1c]
cmp eax, dword [esi + 4]
jne 0x56f2ae
lea edx, [esp + 0x17]
call fcn.004c4280
cmp byte [esp + 0x17], 0
jne 0x56f2ae
lea edx, [esp + 0x18]
call fcn.0056fc30
mov ecx, dword [esp + 0x18]
push ecx
call ebx
add esi, 0x12c
movzx edi, ax
mov dword [esp + 0x24], esi
call fcn.00403630
mov ebx, dword [esp + 0x1c]
add ebx, 0x130
mov word [ebx], 0
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
movzx edx, di
sub eax, ecx
cmp edx, eax
mov dword [esp + 0x20], edx
ja 0x56f2ae
mov edi, dword [esp + 0x1c]
add edi, 0x118
mov ecx, 0x402
mov esi, edi
call fcn.00403cc0
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
cmp eax, 0x400
jb 0x56f1e9
mov eax, 0x400
call fcn.0040a570
mov edx, dword [edi]
mov eax, dword [edx - 0xc]
test eax, eax
jle 0x56f20e
lea ecx, [eax - 1]
mov eax, edi
call fcn.004129b0
cmp ax, 0x5c
je 0x56f20e
push 0x5c
call fcn.00404400
lea ecx, [esp + 0x18]
call fcn.00404530
lea eax, [esp + 0x2c]
push eax
mov dword [esp + 0xcc], 0
call dword [sym.imp.ole32.dll_CoCreateGuid]
push 0x3e
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0x34]
push edx
call dword [sym.imp.ole32.dll_StringFromGUID2]
lea edx, [esp + 0x3c]
call fcn.00412930
lea ecx, [esp + 0x18]
mov dword [esp + 0xc8], 0xffffffff
call fcn.00404510
mov edx, str..tmp
call fcn.00412930
mov dword [esp + 0x1c], 0
push 1
mov dword [esp + 0xcc], 1
mov eax, dword [edi]
push 0xc0000000
push eax
lea eax, [esp + 0x28]
xor edx, edx
push eax
mov eax, 0x80
lea ecx, [edx + 2]
call fcn.004129f0
test eax, eax
jge 0x56f2da
mov edx, 0x5bcc3c
call fcn.004040f0
lea esi, [esp + 0x1c]
call fcn.00410620
xor eax, eax
mov ecx, dword [esp + 0xc0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xa8]
xor ecx, esp
call fcn.005787fd
add esp, 0xb8
ret 8
mov edx, dword [ebp + 4]
mov edi, dword [esp + 0x20]
add edx, dword [ebp + 0x10]
lea ecx, [esp + 0x1c]
push ecx
mov ecx, edi
call fcn.00423680
lea esi, [esp + 0x1c]
call fcn.00410620
add dword [ebp + 0x10], edi
mov edx, ebx
mov edi, ebp
call fcn.0056fc30
movzx edx, word [ebx]
push edx
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [ebx], ax
mov ecx, dword [ebp + 0xc]
sub ecx, dword [ebp + 0x10]
movzx eax, ax
cmp eax, ecx
jbe 0x56f329
mov word [ebx], 0
jmp 0x56f2a5
push eax
call fcn.0057740a
mov edx, dword [esp + 0x28]
movzx ebx, word [ebx]
add esp, 4
mov dword [edx], eax
push 0
mov edx, eax
mov edi, ebp
call fcn.004b6560
lea esi, [esp + 0x1c]
call fcn.00410620
mov eax, 1
jmp 0x56f2b0