Function at 0x41df10
Capabilities:
Get common file path

Disassembly:
mov eax, 0x59e4
call fcn.00406cc0
push ebx
mov eax, 0x100
mov edx, 0x2000
push ebp
mov ebp, dword [esp + 0x59f8]
mov ecx, 0x400
mov word [esp + 0x70], ax
mov eax, dword [esp + 0x59f0]
push esi
push edi
mov word [esp + 0x19ec], dx
movsx edi, word [eax + 2]
mov word [esp + 0x580], cx
mov word [esp + 0x39f0], dx
mov word [esp + 0x17c], cx
mov dword [esp + 0x14], edi
test edi, edi
jle 0x41df80
nop dword [eax]
cmp byte [eax + edi + 3], 0x20
jne 0x41df7c
dec edi
test edi, edi
jg 0x41df70
mov dword [esp + 0x14], edi
mov ebx, 1
cmp edi, ebx
jle 0x41df9c
nop dword [eax]
cmp byte [eax + ebx + 3], 0x20
jne 0x41df9c
inc ebx
cmp ebx, edi
jl 0x41df90
mov al, 1
mov byte [esp + 0x12], al
mov esi, dword [esp + 0x5a08]
mov dh, 2
mov byte [esp + 0x13], dh
nop
mov dword [esp + 0x24], ebx
cmp ebx, edi
jg 0x41e872
xor ecx, ecx
mov word [esp + 0x19ee], cx
nop word [eax + eax]
mov eax, dword [esp + 0x59f8]
mov dl, byte [eax + ebx + 3]
cmp dl, 0x2f
je 0x41e012
cmp dl, 0x5c
je 0x41e012
cmp cx, word [esp + 0x19ec]
jge 0x41e00b
inc cx
movsx eax, cx
mov word [esp + 0x19ee], cx
mov byte [esp + eax + 0x19ef], dl
mov cx, word [esp + 0x19ee]
inc ebx
mov dword [esp + 0x18], ebx
jmp 0x41e036
inc ebx
mov dword [esp + 0x18], ebx
test cx, cx
jg 0x41e03a
movzx eax, word [ebp + 2]
cmp ax, 2
jl 0x41e0d4
cwde
cmp byte [eax + ebp + 3], 0x3a
jne 0x41e0d4
cmp ebx, edi
jle 0x41dfd0
mov byte [esp + 0x12], 0
mov ebx, dword [esp + 0x59fc]
test cx, cx
je 0x41e830
mov eax, 1
movsx edi, cx
cmp edi, eax
jl 0x41e077
nop dword [eax + eax]
cmp byte [esp + eax + 0x19ef], 0x3a
lea esi, [eax + 1]
je 0x41e107
mov eax, esi
cmp eax, edi
jle 0x41e060
mov al, byte [esp + 0x19f0]
cmp al, 0x28
jne 0x41e376
xor eax, eax
mov ecx, 2
mov word [esp + 0x39f2], ax
cmp ecx, edi
jg 0x41e612
mov dl, byte [esp + ecx + 0x19ef]
cmp dl, 0x29
je 0x41e186
cmp ax, word [esp + 0x39f0]
jge 0x41e0d1
inc ax
mov word [esp + 0x39f2], ax
cwde
mov byte [esp + eax + 0x39f3], dl
mov ax, word [esp + 0x39f2]
inc ecx
jmp 0x41e095
mov al, byte [esp + 0x12]
test al, al
je 0x41dfb0
movzx eax, dh
sub eax, 1
je 0x41e0fc
sub eax, 1
mov al, byte [esp + 0x12]
jne 0x41dfb0
mov dh, 1
jmp 0x41dfab
mov al, byte [esp + 0x12]
xor dh, dh
jmp 0x41dfab
push ebp
push eax
movzx eax, word [0x434c98]
push eax
lea eax, [esp + 0x19f8]
push eax
call sym.test_usbprog.exe__string_substr_16
push ebp
call sym.test_usbprog.exe__string_upcase_4
mov cx, word [esp + 0x19ee]
movsx edi, cx
cmp esi, edi
jg 0x41e147
mov al, byte [esp + esi + 0x19ef]
cmp al, 0x2f
je 0x41e142
cmp al, 0x5c
jne 0x41e147
inc esi
cmp esi, edi
jle 0x41e133
mov edx, esi
cmp esi, edi
jg 0x41e16f
mov ebx, 1
sub ebx, esi
lea ecx, [esp + 0x19ef]
add ecx, edx
inc edx
mov al, byte [ecx]
mov byte [ebx + ecx], al
cmp edx, edi
jle 0x41e154
mov cx, word [esp + 0x19ee]
mov eax, 1
sub eax, esi
add cx, ax
mov word [esp + 0x19ee], cx
jmp 0x41e03f
mov eax, dword [esp + 0x19ee]
sub eax, ecx
mov word [esp + 0x7a], ax
cmp edi, 1
jl 0x41e1b4
lea eax, [esp + 0x19f0]
add eax, ecx
push edi
push eax
lea eax, [esp + 0x84]
push eax
call fcn.00408850
add esp, 0xc
lea eax, [esp + 0x984]
mov dword [esp + 0x1c], 1
push eax
lea eax, [esp + 0x180]
push eax
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x39fc]
push eax
call sym.test_usbprog.exe__string_token_16
lea eax, [esp + 0x984]
push eax
call sym.test_usbprog.exe__sys_error_4
test al, al
jne 0x41e612
lea eax, [esp + 0x17c]
push eax
call sym.test_usbprog.exe__string_upcase_4
lea eax, [esp + 0x20]
push eax
push str.COG_EVAR_VAR
lea eax, [esp + 0x184]
push eax
call sym.test_usbprog.exe__string_tkpick80_12
mov eax, dword [esp + 0x20]
sub eax, 1
je 0x41e475
sub eax, 1
je 0x41e304
sub eax, 1
jne 0x41e612
lea eax, [esp + 0x984]
push eax
lea eax, [esp + 0x180]
push eax
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x39fc]
push eax
call sym.test_usbprog.exe__string_token_16
lea eax, [esp + 0x984]
push eax
call sym.test_usbprog.exe__sys_error_4
test al, al
jne 0x41e612
mov ax, word [esp + 0x17e]
cmp word [esp + 0x1c], ax
jle 0x41e612
test ax, ax
jg 0x41e2a4
lea eax, [esp + 0x19ec]
push eax
lea eax, [esp + 0x7c]
push eax
call sym.test_usbprog.exe__string_copy_8
mov cx, word [esp + 0x19ee]
jmp 0x41e046
test bl, 4
je 0x41e847
lea eax, [esp + 0x984]
push eax
lea eax, [esp + 0x19f0]
push eax
lea eax, [esp + 0x184]
push eax
call sym.test_usbprog.exe__sys_envvar_get_12
lea eax, [esp + 0x984]
push eax
call sym.test_usbprog.exe__sys_error_4
test al, al
je 0x41e2e5
xor eax, eax
mov word [esp + 0x19ee], ax
lea eax, [esp + 0x78]
push eax
lea eax, [esp + 0x19f0]
push eax
call sym.test_usbprog.exe__string_append_8
mov cx, word [esp + 0x19ee]
jmp 0x41e046
mov ax, word [esp + 0x1c]
cmp ax, word [esp + 0x17e]
jle 0x41e612
cmp word [esp + 0x7a], 0
jle 0x41e830
test bl, 4
je 0x41e847
lea eax, [esp + 0x984]
push eax
lea eax, [esp + 0x19f0]
push eax
lea eax, [esp + 0x80]
push eax
call sym.test_usbprog.exe__sys_envvar_get_12
lea eax, [esp + 0x984]
push eax
call sym.test_usbprog.exe__sys_error_4
test al, al
jne 0x41e367
mov cx, word [esp + 0x19ee]
jmp 0x41e046
xor ecx, ecx
mov word [esp + 0x19ee], cx
jmp 0x41e046
cmp al, 0x2e
jne 0x41e54b
cmp cx, 1
je 0x41e410
cmp cx, 2
jne 0x41e612
cmp byte [esp + 0x19f1], al
jne 0x41e612
mov dh, byte [esp + 0x13]
cmp dh, 1
jbe 0x41e414
movzx eax, word [ebp + 2]
mov ecx, eax
test ax, ax
jg 0x41e43e
mov eax, dword [esp + 0x5a04]
test byte [eax], 4
je 0x41e42c
movsx ecx, word [ebp]
lea eax, [ebp + 4]
push eax
push ecx
call sub.KERNEL32.dll_GetCurrentDirectoryA
mov esi, eax
test esi, esi
jne 0x41e3ec
push eax
push 0x43854c
push str.err_get_working_dir
push str.string
call sym.test_usbprog.exe__sys_sys_error_bomb_16
movzx ecx, si
movsx eax, cx
mov edx, ecx
mov word [ebp + 2], cx
cmp byte [eax + ebp + 3], 0x5c
jne 0x41e409
lea eax, [ecx - 1]
mov word [ebp + 2], ax
movzx edx, ax
movzx ecx, dx
jmp 0x41e43e
mov dh, byte [esp + 0x13]
mov ebx, dword [esp + 0x18]
mov edi, dword [esp + 0x14]
mov esi, dword [esp + 0x5a08]
mov al, byte [esp + 0x12]
jmp 0x41dfb0
mov ecx, dword [esp + 0x5a08]
xor eax, eax
mov byte [ecx], 3
xor ecx, ecx
mov word [ebp + 2], ax
mov esi, dword [esp + 0x5a08]
movzx ecx, cx
cmp byte [esi], 0
jne 0x41e699
movsx eax, cx
mov al, byte [eax + ebp + 3]
cmp al, 0x3a
jne 0x41e51a
mov ebx, dword [esp + 0x18]
xor eax, eax
mov edi, dword [esp + 0x14]
mov dh, 1
mov word [ebp + 2], ax
jmp 0x41dfab
mov ax, word [esp + 0x1c]
cmp ax, word [esp + 0x17e]
jle 0x41e612
lea eax, [esp + 0x78]
push eax
call sym.test_usbprog.exe__string_terminate_null_4
movups xmm0, xmmword [esp + 0x7c]
lea eax, [esp + 0x580]
push eax
movups xmmword [esp + 0x2c], xmm0
lea eax, [esp + 0x2c]
movups xmm0, xmmword [esp + 0x90]
push eax
movups xmmword [esp + 0x40], xmm0
movups xmm0, xmmword [esp + 0xa4]
movups xmmword [esp + 0x50], xmm0
movups xmm0, xmmword [esp + 0xb4]
movups xmmword [esp + 0x60], xmm0
movups xmm0, xmmword [esp + 0xc4]
movups xmmword [esp + 0x70], xmm0
call sym.test_usbprog.exe__sys_cognivis_dir_8
mov edi, dword [esp + 0x5a08]
lea eax, [esp + 0x580]
push edi
push dword [esp + 0x5a08]
push ebp
push ebx
push eax
call fcn.0041df10
cmp byte [edi], 0
mov edi, dword [esp + 0x14]
jne 0x41e69d
mov ebx, dword [esp + 0x18]
mov al, byte [esp + 0x12]
jmp 0x41dfa2
mov edx, ecx
cmp al, 0x5c
je 0x41e533
movzx eax, cx
dec ecx
cwde
mov word [ebp + 2], cx
movzx edx, cx
cmp byte [eax + ebp + 2], 0x5c
jne 0x41e520
mov ebx, dword [esp + 0x18]
lea eax, [edx - 1]
mov edi, dword [esp + 0x14]
mov word [ebp + 2], ax
mov al, byte [esp + 0x12]
jmp 0x41dfa2
cmp al, 0x7e
jne 0x41e612
cmp cx, 1
jne 0x41e612
test bl, 4
je 0x41e841
lea eax, [esp + 0x984]
push eax
push ebp
push 0x434c68
call sym.test_usbprog.exe__sys_envvar_get_12
lea eax, [esp + 0x984]
push eax
call sym.test_usbprog.exe__sys_error_4
test al, al
je 0x41e590
push ebp
call sym.test_usbprog.exe__sys_sys_rootdir_4
movzx ecx, word [ebp + 2]
test cx, cx
jle 0x41e5aa
movsx eax, cx
cmp byte [eax + ebp + 3], 0x5c
jne 0x41e5aa
lea eax, [ecx - 1]
mov word [ebp + 2], ax
lea eax, [esp + 0x984]
push eax
lea eax, [esp + 0x584]
push eax
push 0x434c7c
call sym.test_usbprog.exe__sys_envvar_get_12
lea eax, [esp + 0x984]
push eax
call sym.test_usbprog.exe__sys_error_4
test al, al
jne 0x41e830
mov ebx, dword [esp + 0x5a08]
lea eax, [esp + 0x580]
push ebx
push dword [esp + 0x5a08]
push ebp
push 5
push eax
call fcn.0041df10
cmp byte [ebx], 0
mov edi, dword [esp + 0x14]
jne 0x41e69d
mov ebx, dword [esp + 0x18]
mov al, byte [esp + 0x12]
jmp 0x41dfa2
movzx eax, byte [esp + 0x13]
sub eax, 0
je 0x41e7f5
sub eax, 1
je 0x41e738
sub eax, 1
jne 0x41e742
cmp word [ebp + 2], ax
jg 0x41e689
mov eax, dword [esp + 0x5a04]
test byte [eax], 4
je 0x41e723
movsx ecx, word [ebp]
lea eax, [ebp + 4]
push eax
push ecx
call sub.KERNEL32.dll_GetCurrentDirectoryA
mov esi, eax
test esi, esi
jne 0x41e671
push eax
push 0x43854c
push str.err_get_working_dir
push str.string
call sym.test_usbprog.exe__sys_sys_error_bomb_16
movzx ecx, si
movsx eax, cx
mov word [ebp + 2], cx
cmp byte [eax + ebp + 3], 0x5c
jne 0x41e689
lea eax, [ecx - 1]
mov word [ebp + 2], ax
mov eax, dword [esp + 0x5a08]
cmp byte [eax], 0
je 0x41e742
mov edi, dword [esp + 0x14]
movzx eax, word [ebp + 2]
mov ecx, eax
cmp ax, word [ebp]
jge 0x41e901
mov ebx, dword [esp + 0x24]
mov esi, edi
sub esi, ebx
inc esi
test ax, ax
jle 0x41e6cc
cmp ebx, edi
jg 0x41e6cc
inc eax
mov word [ebp + 2], ax
movsx eax, cx
mov byte [eax + ebp + 4], 0x2f
test esi, esi
jle 0x41e901
mov edi, 0x2f
nop dword [eax]
movzx eax, word [ebp + 2]
mov edx, eax
cmp ax, word [ebp]
jge 0x41e901
inc eax
movsx edx, dx
mov word [ebp + 2], ax
mov eax, dword [esp + 0x59f8]
mov cl, byte [ebx + eax + 3]
cmp cl, 0x5c
movzx eax, cl
cmove eax, edi
dec esi
inc ebx
mov byte [edx + ebp + 4], al
test esi, esi
jg 0x41e6e0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x59e4
ret 0x14
mov eax, dword [esp + 0x5a08]
xor ecx, ecx
mov byte [eax], 3
mov word [ebp + 2], cx
jmp 0x41e690
push ebp
call sym.test_usbprog.exe__sys_sys_rootdir_4
dec word [ebp + 2]
movzx eax, word [ebp + 2]
mov ecx, eax
mov esi, eax
cmp ax, word [ebp]
jge 0x41e901
inc eax
mov word [ebp + 2], ax
movsx eax, cx
mov byte [eax + ebp + 4], 0x5c
lea eax, [esp + 0x19ec]
push eax
push ebp
call sym.test_usbprog.exe__string_append_8
mov edi, dword [esp + 0x14]
test bl, 1
mov ebx, dword [esp + 0x18]
jne 0x41e784
cmp ebx, edi
jg 0x41e834
lea eax, [esp + 0x984]
push eax
lea eax, [esp + 0x584]
push eax
push ebp
call sym.test_usbprog.exe__file_link_resolve_12
lea eax, [esp + 0x984]
push eax
call sym.test_usbprog.exe__sys_error_4
test al, al
jne 0x41e834
push dword [esp + 0x5a08]
mov al, byte [esp + 0x5a00]
push dword [esp + 0x5a08]
or al, 1
mov word [ebp + 2], si
push ebp
movzx eax, al
push eax
lea eax, [esp + 0x590]
push eax
call fcn.0041df10
mov eax, dword [esp + 0x5a08]
cmp byte [eax], 0
jne 0x41e69d
mov al, byte [esp + 0x12]
jmp 0x41dfa2
lea eax, [esp + 0x19ec]
push eax
call sym.test_usbprog.exe__string_downcase_4
cmp byte [0x4375c1], 0
jne 0x41e810
call sym.test_usbprog.exe__string_set_nodename_0
push 0x43abac
lea eax, [esp + 0x19f0]
push eax
call sym.test_usbprog.exe__string_equal_8
test al, al
je 0x41e856
push ebp
call sym.test_usbprog.exe__sys_sys_rootdir_4
dec word [ebp + 2]
mov ebx, dword [esp + 0x18]
mov edi, dword [esp + 0x14]
mov al, byte [esp + 0x12]
jmp 0x41dfa2
xor eax, eax
mov word [ebp + 2], ax
mov eax, dword [esp + 0x5a08]
mov byte [eax], 3
jmp 0x41e699
mov eax, 1
mov word [ebp + 2], ax
mov eax, dword [esp + 0x5a08]
mov byte [ebp + 4], 0x2f
mov byte [eax], 2
jmp 0x41e699
test al, al
jne 0x41e881
cmp word [ebp + 2], 0
jne 0x41e901
cmp dh, 1
jbe 0x41e8f7
cmp dh, 2
jne 0x41e901
cmp word [ebp + 2], 0
jg 0x41e8e6
mov eax, dword [esp + 0x5a04]
test byte [eax], 4
je 0x41e8dd
movsx ecx, word [ebp]
lea eax, [ebp + 4]
push eax
push ecx
call sub.KERNEL32.dll_GetCurrentDirectoryA
mov esi, eax
test esi, esi
jne 0x41e8c7
push eax
push 0x43854c
push str.err_get_working_dir
push str.string
call sym.test_usbprog.exe__sys_sys_error_bomb_16
movzx ecx, si
movsx eax, cx
mov word [ebp + 2], cx
cmp byte [eax + ebp + 3], 0x5c
jne 0x41e8e6
lea eax, [ecx - 1]
jmp 0x41e8e2
mov byte [esi], 3
xor eax, eax
mov word [ebp + 2], ax
mov eax, dword [esp + 0x5a08]
cmp byte [eax], 0
je 0x41e901
jmp 0x41e69d
push ebp
call sym.test_usbprog.exe__sys_sys_rootdir_4
dec word [ebp + 2]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x59e4
ret 0x14