Function at 0x401000
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xe70
mov eax, dword [0x41c004]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0xe40], 0
cmp edi, 2
jge 0x40105e
push str.Invalid_number_of_arguments._n
call fcn.00408fc5
push str.Sample_network_device:_tCreateSourceN.exe__ECOSYS_M3560idn__10.191.21.242_n
call fcn.00408fc5
push str.Sample_usb_device:_tCreateSourceN.exe__ECOSYS_M3560idn__n
call fcn.00408fc5
add esp, 0xc
pop edi
or eax, 0xffffffff
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00408fb6
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 4]
push eax
lea ecx, [ebp - 0xe3c]
push 0x104
push ecx
call fcn.00409082
xor edx, edx
push 0x206
push edx
lea eax, [ebp - 0x412]
push eax
mov word [ebp - 0x414], dx
call fcn.0040dc00
add esp, 0x18
cmp edi, 2
jle 0x4010ae
mov ecx, dword [esi + 8]
push ecx
lea edx, [ebp - 0x414]
push 0x104
push edx
call fcn.00409082
add esp, 0xc
mov ecx, 0x417764
lea eax, [ebp - 0x414]
lea esp, [esp]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4010e6
test dx, dx
je 0x4010e2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4010e6
add eax, 4
add ecx, 4
test dx, dx
jne 0x4010c0
xor eax, eax
jmp 0x4010eb
sbb eax, eax
sbb eax, 0xffffffff
push ebx
xor ebx, ebx
test eax, eax
sete bl
lea edi, [ebp - 0x61c]
lea esi, [ebp - 0xe3c]
push ebx
mov dword [ebp - 0xe44], ebx
call fcn.00401360
add esp, 4
cmp ebx, 1
jne 0x401124
mov eax, edi
push eax
push 0x104
lea ecx, [ebp - 0x824]
push ecx
jmp 0x401137
lea edx, [ebp - 0x61c]
push edx
push 0x104
lea eax, [ebp - 0x824]
push eax
call fcn.00409082
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x20c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x20c]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401160
sub eax, edx
sar eax, 1
dec eax
test eax, eax
jle 0x40119b
mov ecx, 0x5c
lea esp, [esp]
cmp word [ebp + eax*2 - 0x20c], cx
je 0x401191
dec eax
test eax, eax
jg 0x401180
jmp 0x40119b
xor edx, edx
mov word [ebp + eax*2 - 0x20a], dx
push str.KMSCNSET.dll
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.004090e5
add esp, 0xc
lea ecx, [ebp - 0x20c]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
xor esi, esi
cmp ebx, esi
je 0x40131f
push str.KMQSAddSource
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 4
lea edx, [ebp - 0xc34]
push edx
mov edi, eax
xor eax, eax
push 0xd
push 0x400
mov dword [ebp - 0xe70], esi
mov dword [ebp - 0xe6c], eax
mov dword [ebp - 0xe68], eax
mov dword [ebp - 0xe64], eax
mov dword [ebp - 0xe60], eax
mov dword [ebp - 0xe5c], eax
mov dword [ebp - 0xe58], eax
mov dword [ebp - 0xe54], eax
mov dword [ebp - 0xe50], eax
mov dword [ebp - 0xe4c], eax
mov dword [ebp - 0xe48], eax
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test edi, edi
je 0x4012e4
lea eax, [ebp - 0x61c]
lea ecx, [ebp - 0x824]
mov dword [ebp - 0xe70], eax
mov dword [ebp - 0xe6c], ecx
mov ecx, 0x417794
lea eax, [ebp - 0xc34]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x401286
test dx, dx
je 0x401282
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x401286
add eax, 4
add ecx, 4
test dx, dx
jne 0x401260
xor eax, eax
jmp 0x40128b
sbb eax, eax
sbb eax, 0xffffffff
xor edx, edx
test eax, eax
setne dl
lea eax, [ebp - 0x414]
mov dword [ebp - 0xe48], eax
mov dword [ebp - 0xe68], edx
push 1
lea ecx, [ebp - 0xe70]
push ecx
call edi
cmp eax, 0xfffffff7
jne 0x4012f1
inc esi
push esi
lea edx, [ebp - 0x824]
push edx
push 0x417798
lea eax, [ebp - 0xa2c]
push 0x104
push eax
call fcn.0040915a
lea ecx, [ebp - 0xa2c]
add esp, 0x14
mov dword [ebp - 0xe6c], ecx
jmp 0x4012a4
push str.ERROR:_Failed_to_find_function_KMQSAddSource._n
call fcn.00408fc5
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0xe44]
cmp eax, 1
jne 0x401335
call fcn.00401460
mov eax, dword [ebp - 0xe40]
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00408fb6
mov esp, ebp
pop ebp
ret
push str.ERROR:_Failed_to_load_library._n
call fcn.00408fc5
mov dword [ebp - 0xe40], 0xffffffff
jmp 0x401345
test eax, eax
jne 0x401348
lea edx, [ebp - 0x61c]
push edx
call fcn.00401710
add esp, 4
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0xe40]
pop ebx
pop edi
xor ecx, ebp
pop esi
call fcn.00408fb6
mov esp, ebp
pop ebp
ret