Function at 0x401820
Capabilities:
Check if file exists
Enumerate files on windows
Get file attributes
Get geographical location

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x49c
mov eax, dword [0x406148]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x18]
push ebx
mov ebx, dword [ebp + 0x14]
push esi
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x480], eax
mov eax, dword [ebp + 0x20]
mov esi, 0x103
push esi
mov dword [ebp - 0x498], eax
lea eax, [ebp - 0x223]
push 0
push eax
mov dword [ebp - 0x478], edi
mov dword [ebp - 0x49c], ebx
mov byte [ebp - 0x224], 0
call sub.MSVCR80.dll_memset
push esi
lea eax, [ebp - 0x11f]
push 0
push eax
mov byte [ebp - 0x120], 0
call sub.MSVCR80.dll_memset
push esi
lea eax, [ebp - 0x327]
push 0
push eax
mov byte [ebp - 0x328], 0
call sub.MSVCR80.dll_memset
mov ecx, dword [ebp + 8]
or dword [ebp - 0x47c], 0xffffffff
add esp, 0x24
test ecx, ecx
mov dword [ebp - 0x474], 0x80004005
je 0x401ed9
cmp byte [ecx], 0
je 0x401ed9
test edi, edi
je 0x401ed9
cmp byte [edi], 0
je 0x401ed9
mov eax, ecx
lea edi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4018df
sub eax, edi
mov edi, eax
cmp edi, esi
jb 0x4018f8
mov eax, 0x80004005
jmp 0x401ede
test ebx, ebx
je 0x4018ff
and dword [ebx], 0
lea edx, [ebp - 0x224]
mov eax, ecx
sub edx, ecx
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x401909
lea eax, [ebp - 0x224]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40191c
sub eax, edx
cmp byte [ebp + eax - 0x225], 0x5c
je 0x401953
cmp edi, 0x102
jae 0x4018ee
push 0xffffffffffffffff
push 0x40144c
lea eax, [ebp - 0x224]
push 0x104
push eax
call dword [sym.imp.MSVCR80.dll_strncat_s]
add esp, 0x10
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4018ee
push 0x40143c
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push 0x401420
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x401984
call eax
jmp 0x40198a
call dword [sym.imp.KERNEL32.dll_GetSystemDefaultLangID]
movzx esi, ax
mov dword [ebp - 0x46c], esi
call dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
mov dword [ebp - 0x488], eax
mov eax, esi
mov edi, 0x3ff
and eax, edi
cmp ax, 1
je 0x4019b4
cmp ax, 0xd
jne 0x4019be
mov dword [ebp - 0x46c], 0x409
movzx eax, word [ebp - 0x46c]
mov ebx, dword [ebp - 0x488]
mov esi, dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 0xb
inc ebx
push eax
mov dword [ebp - 0x484], ebx
call esi
test eax, eax
je 0x4019f8
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.MSVCR80.dll_atoi]
pop ecx
mov dword [ebp - 0x484], eax
push 0xc
lea eax, [ebp - 0x10]
push eax
movzx eax, word [ebp - 0x46c]
push 0x1004
push eax
call esi
test eax, eax
je 0x401a1e
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.MSVCR80.dll_atoi]
pop ecx
mov ebx, eax
mov eax, dword [ebp - 0x488]
cmp eax, 0xfde9
je 0x401a41
cmp eax, dword [ebp - 0x484]
je 0x401a41
cmp eax, ebx
je 0x401a41
mov dword [ebp - 0x46c], 0x409
movzx eax, word [ebp - 0x46c]
mov ecx, eax
shr ecx, 0x10
and ecx, 0xf
mov dword [ebp - 0x494], eax
and eax, edi
shl ecx, 0x10
or ecx, eax
push 0xffffffffffffffff
lea eax, [ebp - 0x224]
push eax
mov esi, 0x104
lea eax, [ebp - 0x120]
or ecx, 0x400
push esi
push eax
mov dword [ebp - 0x490], ecx
mov dword [ebp - 0x48c], 0x409
call dword [sym.imp.MSVCR80.dll_strncat_s]
push 0xffffffffffffffff
lea eax, [ebp - 0x120]
push eax
lea eax, [ebp - 0x328]
push esi
push eax
call dword [sym.imp.MSVCR80.dll_strncpy_s]
add esp, 0x20
xor ebx, ebx
xor eax, eax
test ebx, ebx
jbe 0x401ace
mov ecx, dword [ebp + ebx*4 - 0x494]
cmp dword [ebp + eax*4 - 0x494], ecx
je 0x401ac6
inc eax
cmp eax, ebx
jb 0x401ab8
cmp eax, ebx
jb 0x401bd0
push 0xa
lea eax, [ebp - 0x1c]
push eax
push dword [ebp + ebx*4 - 0x494]
call dword [sym.imp.MSVCR80.dll__itoa]
lea eax, [ebp - 0x1c]
add esp, 0xc
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x401aea
sub eax, ecx
mov edi, eax
mov eax, dword [ebp - 0x478]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x401afe
sub eax, ecx
mov ecx, eax
lea eax, [ebp - 0x120]
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x401b12
sub eax, esi
mov edx, 0x103
lea ecx, [ecx + edi + 1]
sub edx, eax
cmp edx, ecx
jb 0x4018ee
lea eax, [ebp - 0x1c]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401b33
lea edi, [ebp - 0x120]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x401b43
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x120]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x401b62
mov eax, dword [ebp - 0x478]
mov esi, 0x40144c
movsw word es:[edi], word [esi]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401b79
lea edi, [ebp - 0x120]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x401b89
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [ebp - 0x120]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x401c0a
push eax
lea eax, [ebp - 0x328]
push eax
lea eax, [ebp - 0x120]
push 0x104
push eax
call dword [sym.imp.MSVCR80.dll_strncpy_s]
add esp, 0x10
inc ebx
cmp ebx, 3
jb 0x401aab
lea eax, [ebp - 0x120]
mov byte [ebp - 0x46d], 1
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x401bea
sub eax, ecx
mov esi, eax
lea eax, [ebp - 0x224]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x401bfe
jmp 0x401e42
mov eax, dword [ebp + ebx*4 - 0x494]
and dword [ebp - 0x474], 0
mov dword [ebp - 0x47c], eax
jmp 0x401e69
lea eax, [ebp - 0x224]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401c2b
lea edi, [ebp - 0x120]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x401c3b
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x120]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x401c5a
lea eax, [ebp - 0x468]
push eax
lea eax, [ebp - 0x120]
mov esi, 0x40141c
push eax
movsd dword es:[edi], dword [esi]
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x46c], eax
lea eax, [ebp - 0x120]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x401c8b
sub eax, ecx
cmp dword [ebp - 0x46c], 0xffffffff
mov ebx, eax
je 0x401e60
jmp 0x401dc1
test byte [ebp - 0x468], 0x10
je 0x401dc1
push 2
mov edi, 0x401418
lea esi, [ebp - 0x43c]
pop ecx
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x401dc1
push 3
mov edi, 0x401414
lea esi, [ebp - 0x43c]
pop ecx
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x401dc1
mov byte [ebp + ebx - 0x123], al
lea eax, [ebp - 0x43c]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x401cf5
sub eax, ecx
mov edi, eax
mov eax, dword [ebp - 0x478]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x401d09
sub eax, ecx
mov ecx, eax
lea eax, [ebp - 0x120]
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x401d1d
sub eax, esi
mov edx, 0x103
lea ecx, [ecx + edi + 1]
sub edx, eax
cmp edx, ecx
jb 0x401dc1
lea eax, [ebp - 0x43c]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401d41
lea edi, [ebp - 0x120]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x401d51
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x120]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x401d70
mov eax, dword [ebp - 0x478]
mov esi, 0x40144c
movsw word es:[edi], word [esi]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401d87
lea edi, [ebp - 0x120]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x401d97
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [ebp - 0x120]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x401dde
lea eax, [ebp - 0x468]
push eax
push dword [ebp - 0x46c]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x401ca8
jmp 0x401df9
lea eax, [ebp - 0x43c]
push eax
call dword [sym.imp.MSVCR80.dll_atol]
and dword [ebp - 0x474], 0
pop ecx
mov dword [ebp - 0x47c], eax
push dword [ebp - 0x46c]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp - 0x474], 0
jge 0x401e69
cmp byte [ebp - 0x46d], 0
je 0x401e60
lea eax, [ebp - 0x120]
mov byte [ebp - 0x46d], 0
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x401e27
sub eax, ecx
mov esi, eax
lea eax, [ebp - 0x224]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x401e3b
sub eax, ecx
mov ecx, 0x104
sub ecx, esi
add eax, 3
cmp ecx, eax
jae 0x401c23
mov dword [ebp - 0x474], 0x80004005
cmp dword [ebp - 0x474], 0
jl 0x401ed1
mov eax, dword [ebp - 0x498]
test eax, eax
je 0x401e7b
mov ecx, dword [ebp - 0x47c]
mov dword [eax], ecx
mov esi, dword [ebp - 0x49c]
test esi, esi
je 0x401ead
push dword [ebp + 0x10]
lea eax, [ebp - 0x120]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov dword [esi], eax
neg eax
sbb eax, eax
and eax, 0x7fffbffb
add eax, 0x80004005
mov dword [ebp - 0x474], eax
cmp dword [ebp - 0x480], 0
je 0x401ed1
push 0xffffffffffffffff
lea eax, [ebp - 0x120]
push eax
push dword [ebp + 0x1c]
push dword [ebp - 0x480]
call dword [sym.imp.MSVCR80.dll_strncpy_s]
add esp, 0x10
mov eax, dword [ebp - 0x474]
jmp 0x401ede
mov eax, 0x80070057
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00404d6b
leave
ret 0x1c