Function at 0x11040c6
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x230
mov eax, dword [0x111121c]
push ebx
push esi
push edi
xor ebx, ebx
cmp dword [ebp + 8], 5
mov edi, ecx
push ebx
mov dword [ebp - 4], eax
mov dword [ebp - 0x214], edi
push 0x102876c
jge 0x1104230
push 0x1028c18
push reloc.WSOCK32.dll_bind
call fcn.01101058
mov esi, eax
cmp esi, ebx
je 0x11042da
push ebx
push ebx
push ebx
push 0x1028c0c
push esi
mov ecx, edi
call fcn.0110115f
push esi
mov dword [ebp - 0x210], eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x210], ebx
je 0x11042da
push dword [ebp - 0x210]
mov edi, dword [sym.imp.SHLWAPI.dll_wnsprintfA]
push 0x1028bdc
mov esi, 0x104
lea eax, [ebp - 0x108]
push esi
push eax
call edi
mov ecx, dword [ebp - 0x214]
add esp, 0x10
push dword [ebp - 0x210]
call fcn.011011e6
mov ecx, dword [ebp - 0x214]
push ebx
push 0x102876c
lea eax, [ebp - 0x108]
push eax
push reloc.WSOCK32.dll_bind
call fcn.01101058
cmp eax, ebx
mov dword [ebp - 0x220], eax
je 0x11042da
mov ecx, dword [ebp - 0x214]
push ebx
push ebx
push ebx
push 0x1028bd4
push eax
call fcn.0110115f
push dword [ebp - 0x220]
mov dword [ebp - 0x210], eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x210], ebx
je 0x11042da
push dword [0x1112638]
lea eax, [ebp - 0x108]
push dword [ebp - 0x210]
push 0x1028b80
push esi
push eax
call edi
mov ecx, dword [ebp - 0x214]
add esp, 0x14
push dword [ebp - 0x210]
call fcn.011011e6
mov ecx, dword [ebp - 0x214]
lea eax, [ebp - 0x108]
push eax
call fcn.01101b10
mov esi, eax
cmp esi, ebx
je 0x11042da
mov ecx, dword [ebp - 0x214]
push esi
call fcn.01103ad2
push esi
mov edi, eax
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
mov eax, edi
jmp 0x1104504
push 0x1028ba8
push reloc.WSOCK32.dll_accept
call fcn.01101058
mov esi, eax
cmp esi, ebx
je 0x11042da
push ebx
push ebx
push ebx
push 0x1028c0c
push esi
mov ecx, edi
call fcn.0110115f
push esi
mov dword [ebp - 0x210], eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x210], ebx
je 0x11042da
mov esi, 0x104
push esi
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
cmp eax, ebx
jne 0x110428d
push dword [ebp - 0x210]
jmp 0x11042d3
mov ecx, esi
sub ecx, eax
push ecx
push 0x1028b9c
lea eax, [ebp + eax - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push ebx
push 0x8000000
push 3
push ebx
push 3
push accept
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
push dword [ebp - 0x210]
mov dword [ebp - 0x21c], eax
jne 0x11042e1
mov ecx, edi
call fcn.011011e6
xor eax, eax
jmp 0x1104504
lea ecx, [ebp - 0x218]
push ecx
push eax
mov ecx, edi
mov dword [ebp - 0x224], ebx
mov dword [ebp - 0x220], ebx
mov dword [ebp - 0x218], ebx
mov dword [ebp - 0x22c], ebx
mov dword [ebp - 0x230], ebx
call fcn.0110195e
test eax, eax
je 0x11044c4
push dword [0x1112634]
mov edi, dword [ebp - 0x218]
mov ecx, dword [ebp - 0x214]
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0x21c]
mov dword [ebp - 0x228], ebx
mov dword [ebp - 0x218], edi
call fcn.0110195e
test eax, eax
je 0x1104375
mov eax, dword [ebp - 0x210]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x1104353
mov ecx, dword [ebp - 0x218]
sub eax, edx
sub ecx, edi
add eax, 0x21
cmp ecx, eax
jne 0x1104375
mov dword [ebp - 0x228], 0x34
push dword [0x1112630]
mov ecx, dword [ebp - 0x214]
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0x21c]
mov dword [ebp - 0x218], edi
call fcn.0110195e
test eax, eax
je 0x1104404
mov eax, dword [ebp - 0x210]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x11043a6
mov ecx, dword [ebp - 0x228]
sub eax, edx
lea ecx, [eax + ecx + 0x21]
mov eax, dword [ebp - 0x218]
mov edx, eax
sub edx, edi
cmp edx, ecx
jne 0x11043d7
mov dword [ebp - 0x230], 1
mov dword [ebp - 0x22c], eax
push dword [ebp - 0x210]
mov ecx, dword [ebp - 0x214]
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0x21c]
inc edi
mov dword [ebp - 0x218], edi
call fcn.0110195e
test eax, eax
jne 0x1104316
cmp dword [ebp - 0x230], ebx
je 0x11044c4
mov eax, dword [0x1112630]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x1104418
mov ecx, dword [ebp - 0x22c]
push ebx
sub eax, edx
push ebx
lea eax, [eax + ecx + 1]
push eax
push dword [ebp - 0x21c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x11044c4
mov ecx, dword [ebp - 0x214]
push esi
lea eax, [ebp - 0x108]
push eax
push dword [ebp - 0x21c]
call fcn.01101a85
test eax, eax
je 0x11044c4
push dword [ebp - 0x21c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [0x1112638]
or dword [ebp - 0x21c], 0xffffffff
lea eax, [ebp - 0x108]
push eax
push 0x1028b80
lea eax, [ebp - 0x20c]
push esi
push eax
call dword [sym.imp.SHLWAPI.dll_wnsprintfA]
mov ecx, dword [ebp - 0x214]
add esp, 0x14
lea eax, [ebp - 0x20c]
push eax
call fcn.01101b10
cmp eax, ebx
mov dword [ebp - 0x224], eax
je 0x11044c4
mov ecx, dword [ebp - 0x214]
push eax
call fcn.01103ad2
mov dword [ebp - 0x220], eax
push dword [ebp - 0x210]
mov ecx, dword [ebp - 0x214]
call fcn.011011e6
cmp dword [ebp - 0x224], ebx
je 0x11044e9
push dword [ebp - 0x224]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
cmp dword [ebp - 0x21c], 0xffffffff
je 0x11044fe
push dword [ebp - 0x21c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x220]
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.0105ec09
leave
ret 4