Function at 0x418420
Capabilities:
Get common file path
Get hostname
Set current directory

Disassembly:
sub esp, 0x3b4
push ebx
push ebp
push esi
mov ebp, ecx
push edi
xor ebx, ebx
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x5d]
mov byte [esp + 0x5c], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x29]
mov byte [esp + 0x28], bl
rep stosd dword es:[edi], eax
mov esi, dword [sym.imp.MSVCRT.dll_time]
push ebx
stosw word es:[edi], ax
stosb byte es:[edi], al
call esi
mov edi, dword [sym.imp.MSVCRT.dll_srand]
push eax
call edi
mov eax, dword [ebp + 8]
xor ecx, ecx
add esp, 8
mov cl, byte [eax + 0x1b8]
cmp ecx, 4
ja case.default.0x41847f
jmp dword [ecx*4 + 0x41888c]
push 0
call esi
push eax
call edi
mov eax, dword [ebp + 8]
add esp, 8
xor ebx, ebx
mov cl, byte [eax + 0x1b9]
test cl, cl
jbe 0x4184c9
mov esi, dword [sym.imp.MSVCRT.dll_rand]
call esi
mov ecx, dword [ebp + 4]
mov edx, dword [ebp + 8]
add eax, ecx
and eax, 0xf
inc ebx
mov cl, byte [eax + str.ABCDEF0123456789]
xor eax, eax
mov byte [esp + ebx + 0x27], cl
mov al, byte [edx + 0x1b9]
cmp ebx, eax
jl 0x4184a5
mov ecx, dword [ebp + 8]
cmp byte [ecx + 0x1b9], 0xe
jbe case.default.0x41847f
lea edx, [esp + 0x14]
mov ecx, ebp
push edx
call fcn.0041b790
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x2c], ecx
mov cl, byte [esp + 0x24]
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], eax
mov byte [esp + 0x38], cl
jmp case.default.0x41847f
mov cl, byte [eax + 0x1b9]
xor ebx, ebx
test cl, cl
jbe case.default.0x41847f
mov esi, dword [eax + 0x1bc]
cmp ebx, dword [esi - 8]
jge 0x418536
mov dl, byte [esi + ebx]
mov byte [esp + ebx + 0x28], dl
jmp 0x41853b
mov byte [esp + ebx + 0x28], 0x30
xor ecx, ecx
inc ebx
mov cl, byte [eax + 0x1b9]
cmp ebx, ecx
jl 0x418522
jmp case.default.0x41847f
mov ecx, dword [eax + 0x1dc]
test ecx, ecx
je 0x418565
mov edx, dword [ebp + 0x14]
mov ecx, dword [edx - 8]
test ecx, ecx
jne case.default.0x41847f
mov cl, byte [eax + 0x74]
test cl, cl
je 0x418570
push 0x10
jmp 0x418572
push 0xa
mov ecx, dword [0x4e6114]
mov edx, dword [0x4e6110]
lea eax, [esp + 0x60]
push eax
push ecx
push edx
call dword [sym.imp.MSVCRT.dll__i64toa]
lea edi, [esp + 0x6c]
or ecx, 0xffffffff
xor eax, eax
mov esi, dword [ebp + 8]
add esp, 0x10
xor ebx, ebx
repne scasb al, byte es:[edi]
mov al, byte [esi + 0x1b9]
not ecx
dec ecx
test eax, eax
jle case.default.0x41847f
mov edx, dword [esi + 0x1c0]
cmp ebx, dword [edx - 8]
jge 0x4185bf
mov al, byte [edx + ebx]
jmp 0x4185d8
mov edx, eax
sub edx, ecx
cmp ebx, edx
jge 0x4185ce
mov byte [esp + ebx + 0x28], 0x30
jmp 0x4185dc
mov edx, ecx
sub edx, eax
add edx, ebx
mov al, byte [esp + edx + 0x5c]
mov byte [esp + ebx + 0x28], al
xor eax, eax
inc ebx
mov al, byte [esi + 0x1b9]
cmp ebx, eax
jl 0x4185af
jmp case.default.0x41847f
cmp byte [eax + 0x1b9], 0x14
jb case.default.0x41847f
lea ecx, [esp + 0x48]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov eax, dword [esp + 0x56]
xor edx, edx
mov ecx, dword [esp + 0x54]
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], edx
and eax, 0xffff
mov dword [esp + 0x1c], edx
push eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x56]
and ecx, 0xffff
and edx, 0xffff
push ecx
mov ecx, dword [esp + 0x56]
and eax, 0xffff
push edx
mov edx, dword [esp + 0x56]
push eax
mov eax, dword [esp + 0x58]
and ecx, 0xffff
and eax, 0xffff
and edx, 0xffff
push ecx
sub eax, 0x7d0
push edx
push eax
lea ecx, [esp + 0x30]
push str._2d_02d_02d_02d_02d_02d_03d
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
mov eax, dword [ebp + 8]
add esp, 0x24
xor ebx, ebx
mov cl, byte [eax + 0x1b9]
test cl, cl
jbe case.default.0x41847f
mov esi, dword [sym.imp.KERNEL32.dll_GetComputerNameA]
mov edi, 0xff
mov eax, dword [eax + 0x1d8]
cmp ebx, dword [eax - 8]
jge 0x4186ac
mov dl, byte [eax + ebx]
mov byte [esp + ebx + 0x28], dl
jmp 0x418709
cmp ebx, 6
jge 0x4186f5
lea eax, [esp + 0x10]
lea ecx, [esp + 0x2c4]
push eax
push ecx
mov dword [esp + 0x18], edi
call esi
mov edx, dword [esp + 0x10]
lea eax, [edx + ebx]
cmp eax, 6
jb 0x418704
mov al, byte [esp + eax + 0x2be]
cmp al, 0x30
jl 0x4186df
cmp al, 0x39
jle 0x4186fe
cmp al, 0x61
jl 0x4186e7
cmp al, 0x7a
jle 0x4186fe
cmp al, 0x41
jl 0x418704
cmp al, 0x5a
jg 0x418704
mov byte [esp + ebx + 0x28], al
jmp 0x418709
cmp ebx, 0x14
jge 0x418704
mov al, byte [esp + ebx + 0xe]
mov byte [esp + ebx + 0x28], al
jmp 0x418709
mov byte [esp + ebx + 0x28], 0x30
mov eax, dword [ebp + 8]
xor ecx, ecx
inc ebx
mov cl, byte [eax + 0x1b9]
cmp ebx, ecx
jl 0x418698
jmp case.default.0x41847f
mov ecx, dword [eax + 0x1dc]
test ecx, ecx
je 0x41873a
mov edx, dword [ebp + 0x14]
mov eax, dword [edx - 8]
test eax, eax
jne case.default.0x41847f
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0xbd]
mov byte [esp + 0xbc], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0xbc]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x1c1]
mov byte [esp + 0x1c0], 0
rep stosd dword es:[edi], eax
mov ecx, dword [0x4e5df8]
lea edx, [esp + 0x1c0]
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ecx - 8]
mov ecx, 0x4e5df8
push eax
push edx
push eax
call sub.MFC42.DLL_CString::GetBuffer
push eax
mov ecx, ebp
call fcn.0041b810
mov esi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea eax, [esp + 0x1c0]
push eax
call esi
mov ecx, dword [0x4e5df8]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
je 0x418814
push str.GeneratorSerialNum
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edx, eax
test edx, edx
je 0x418814
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x7d]
mov byte [esp + 0x7c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x7c]
push eax
call edx
add esp, 4
xor ebx, ebx
mov al, byte [esp + ebx + 0x7c]
test al, al
je 0x41880e
mov byte [esp + ebx + 0x28], al
inc ebx
cmp ebx, 0x40
jl 0x4187fc
mov byte [0x4e5dd1], bl
lea ecx, [esp + 0xbc]
push ecx
call esi
lea edx, [esp + 0x28]
lea esi, [ebp + 0x10]
push edx
push 0x4df2f8
push esi
mov byte [esp + ebx + 0x34], 0
call sub.MFC42.DLL_CString::Format
mov eax, dword [ebp + 8]
xor edi, edi
add esp, 0xc
cmp dword [eax + 0x1dc], edi
je 0x418863
mov ecx, dword [ebp + 0x14]
lea eax, [ebp + 0x14]
cmp dword [ecx - 8], edi
je 0x418863
push eax
mov ecx, esi
call fcn.004a5776
mov edx, dword [esi]
mov al, byte [edx - 8]
mov byte [0x4e5dd1], al
mov ecx, dword [0x4e6110]
mov eax, dword [0x4e6114]
add ecx, 1
adc eax, edi
pop edi
pop esi
pop ebp
mov dword [0x4e6110], ecx
mov dword [0x4e6114], eax
pop ebx
add esp, 0x3b4
ret