Function at 0x406060
Capabilities:
Create directory
Extract resource via kernel32 functions
Get common file path
Read .ini file
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x41d356
mov eax, dword fs:[0]
push eax
mov eax, 0x10f4
call fcn.0041be10
mov eax, dword [0x42b75c]
xor eax, esp
mov dword [esp + 0x10f0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x42b75c]
xor eax, esp
push eax
lea eax, [esp + 0x1108]
mov dword fs:[0], eax
mov esi, ecx
lea ecx, [esp + 0x3c]
mov dword [esp + 0x1110], 0
call fcn.0041a710
lea ecx, [esp + 0x30]
mov byte [esp + 0x1110], 1
xor bl, bl
call fcn.004128a0
push 0x4211ec
push 1
push str.chksum
push str.MagicNumber
mov byte [esp + 0x1120], 2
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
test eax, eax
je 0x4061a0
mov eax, dword [esi + 0x38b8]
push eax
lea ecx, [esp + 0x34]
call fcn.00413990
cmp eax, 1
je 0x40611e
mov ecx, dword [esi + 0x20]
push 0
push 0
push 0x10
push ecx
mov dword [esi + 0x38e0], 1
call dword [sym.imp.USER32.dll_PostMessageA]
push 0x421228
lea ecx, [esp + 0x2c]
call fcn.00401a40
mov edx, dword [esi + 0x38c4]
push edx
push eax
lea eax, [esp + 0x20]
push eax
mov byte [esp + 0x111c], 3
call fcn.00401e70
add esp, 0xc
lea ecx, [esp + 0x28]
mov byte [esp + 0x1110], 5
call fcn.00401cb0
lea ecx, [esp + 0x20]
call fcn.004019f0
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x20]
push ecx
push edx
lea ecx, [esp + 0x38]
mov byte [esp + 0x1118], 6
call fcn.00412fc0
lea ecx, [esp + 0x20]
mov byte [esp + 0x1110], 5
call fcn.00401cb0
lea ecx, [esp + 0x18]
mov byte [esp + 0x1110], 2
call fcn.00401cb0
mov eax, dword [esi + 0x38b8]
push 0x42121c
push 0x421208
push eax
lea ecx, [esi + 0x8cc]
push str._s_s_s
push ecx
call dword [sym.imp.MSVCR90.dll_sprintf]
mov edx, dword [esi + 0x38b8]
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcpyA]
add esp, 0x14
push edx
lea eax, [esi + 0x186c]
push eax
call ebp
mov ecx, dword [esi + 0x38bc]
push ecx
lea edi, [esi + 0x203c]
push edi
call ebp
mov edx, dword [esi + 0x38c0]
push edx
lea eax, [esi + 0x280c]
push eax
call ebp
push 0x42164c
lea ecx, [esp + 0x111c]
call fcn.00401750
test eax, eax
jne 0x4062f9
lea ecx, [esp + 0x14]
call dword [sym.imp.mfc90.dll_Ordinal_316]
lea ecx, [esp + 0x14]
push ecx
push edi
mov ecx, esi
mov byte [esp + 0x1118], 7
call fcn.00404070
test al, al
je 0x40624e
lea ecx, [esp + 0x14]
call dword [sym.imp.mfc90.dll_Ordinal_910]
push eax
lea ecx, [esp + 0x40]
call fcn.0041a770
mov bl, 1
call fcn.0040bcf0
test eax, eax
je 0x406295
push 0x325
call fcn.0040bd10
add esp, 4
test eax, eax
je 0x406295
push edi
push 0x325
call fcn.0040df10
add esp, 8
cmp eax, 2
jne 0x406295
mov edx, dword [str.No_Function]
mov eax, dword [str.No_Class]
push edx
push eax
push 0x325
call fcn.0040bd30
add esp, 0xc
call fcn.0040bcf0
test eax, eax
je 0x4062e7
push 0x326
call fcn.0040bd10
add esp, 4
test eax, eax
je 0x4062e7
lea ecx, [esp + 0x14]
call dword [sym.imp.mfc90.dll_Ordinal_910]
push eax
push 0x326
call fcn.0040df10
add esp, 8
cmp eax, 2
jne 0x4062e7
mov ecx, dword [str.No_Function]
mov edx, dword [str.No_Class]
push ecx
push edx
push 0x326
call fcn.0040bd30
add esp, 0xc
lea ecx, [esp + 0x14]
mov byte [esp + 0x1110], 2
call dword [sym.imp.mfc90.dll_Ordinal_601]
movzx eax, word [esi + 0x38e6]
movzx ecx, word [esi + 0x38e4]
mov edx, eax
shl edx, 0xa
or edx, ecx
movzx edx, dx
mov dword [esp + 0x20], edx
test bl, bl
je 0x406345
lea ecx, [esp + 0x3c]
call fcn.0041a860
movzx eax, al
push 0x4211ec
push eax
push str.InternetConnected
push str.MagicNumber
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
test eax, eax
setne bl
jmp 0x406423
push eax
mov eax, dword [0x42b814]
push ecx
push 0xed
push eax
lea ecx, [esp + 0x4c]
call fcn.0041acd0
mov bl, al
test bl, bl
jne 0x406423
movzx edx, word [esi + 0x38e4]
xor ecx, ecx
push ecx
push edx
mov word [esi + 0x38e6], cx
mov eax, dword [0x42b814]
push 0xed
push eax
lea ecx, [esp + 0x4c]
call fcn.0041acd0
mov bl, al
test bl, bl
jne 0x406423
movzx edx, word [esi + 0x38e4]
mov ecx, 1
push ecx
push edx
mov word [esi + 0x38e6], cx
mov eax, dword [0x42b814]
push 0xed
push eax
lea ecx, [esp + 0x4c]
call fcn.0041acd0
mov bl, al
test bl, bl
jne 0x406423
movzx edx, word [esi + 0x38e4]
mov ecx, 2
push ecx
push edx
mov word [esi + 0x38e6], cx
mov eax, dword [0x42b814]
push 0xed
push eax
lea ecx, [esp + 0x4c]
call fcn.0041acd0
mov bl, al
test bl, bl
jne 0x406423
mov edx, 1
push edx
mov ecx, 9
push ecx
mov word [esi + 0x38e4], cx
mov word [esi + 0x38e6], dx
mov eax, dword [0x42b814]
push 0xed
push eax
lea ecx, [esp + 0x4c]
call fcn.0041acd0
mov bl, al
call fcn.0040bcf0
test eax, eax
je 0x406471
push 0x323
call fcn.0040bd10
add esp, 4
test eax, eax
je 0x406471
movzx ecx, word [esi + 0x38e4]
push ecx
push 0x323
call fcn.0040db40
add esp, 8
cmp eax, 2
jne 0x406471
mov edx, dword [str.No_Function]
mov eax, dword [str.No_Class]
push edx
push eax
push 0x323
call fcn.0040bd30
add esp, 0xc
call fcn.0040bcf0
test eax, eax
je 0x4064bf
push 0x324
call fcn.0040bd10
add esp, 4
test eax, eax
je 0x4064bf
movzx ecx, word [esi + 0x38e6]
push ecx
push 0x324
call fcn.0040db40
add esp, 8
cmp eax, 2
jne 0x4064bf
mov edx, dword [str.No_Function]
mov eax, dword [str.No_Class]
push edx
push eax
push 0x324
call fcn.0040bd30
add esp, 0xc
cmp bl, 1
jne 0x4068cf
lea ecx, [esp + 0x28]
call fcn.00419d00
lea ebp, [esi + 0x2fdc]
push ebp
push 0x104
mov byte [esp + 0x1118], 8
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
push str.__hp_hut
push ebp
call edi
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push ebp
lea ecx, [esp + 0xf00]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push str.__hp_hut.html
lea edx, [esp + 0xf00]
push edx
call edi
lea ecx, [esp + 0x3c]
call fcn.0041ada0
cmp eax, 2
jle 0x406835
xor eax, eax
mov dword [esp + 0x14], eax
jmp 0x406540
mov ecx, dword [0x42b814]
add eax, 0x1f4
movzx eax, ax
push str.GIMG
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
je 0x4065d9
mov edx, dword [0x42b814]
push edi
push edx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [esp + 0x18], eax
mov eax, dword [0x42b814]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x4065d9
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
test ebx, ebx
je 0x4065d9
mov ecx, dword [esp + 0x14]
inc ecx
push ecx
push ebp
lea edx, [esp + 0x1008]
push str._sgimg_d.gif
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [esp + 0x1010]
push 0x4219d8
push eax
call dword [sym.imp.MSVCR90.dll_fopen]
mov ecx, dword [esp + 0x30]
mov edi, eax
push edi
push 1
push ecx
push ebx
call dword [sym.imp.MSVCR90.dll_fwrite]
push edi
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 0x2c
mov eax, dword [esp + 0x14]
inc eax
cmp eax, 0x14
mov dword [esp + 0x14], eax
jl 0x406540
xor eax, eax
mov dword [esp + 0x14], eax
add eax, 0x258
movzx edx, ax
mov eax, dword [0x42b814]
push str.JIMG
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
je 0x40668a
mov ecx, dword [0x42b814]
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edx, dword [0x42b814]
push edi
push edx
mov dword [esp + 0x20], eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x40668a
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
test ebx, ebx
je 0x40668a
mov eax, dword [esp + 0x14]
inc eax
push eax
push ebp
lea ecx, [esp + 0x1008]
push str._sjimg_d.jpg
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
lea edx, [esp + 0x1010]
push 0x4219d8
push edx
call dword [sym.imp.MSVCR90.dll_fopen]
mov edi, eax
mov eax, dword [esp + 0x30]
push edi
push 1
push eax
push ebx
call dword [sym.imp.MSVCR90.dll_fwrite]
push edi
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 0x2c
mov eax, dword [esp + 0x14]
inc eax
cmp eax, 0x14
mov dword [esp + 0x14], eax
jl 0x4065f1
xor eax, eax
mov dword [esp + 0x14], eax
mov edx, dword [0x42b814]
add eax, 0xf7
movzx ecx, ax
push str.JSCR
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
je 0x40673b
mov eax, dword [0x42b814]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [0x42b814]
push edi
push ecx
mov dword [esp + 0x20], eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x40673b
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
test ebx, ebx
je 0x40673b
mov edx, dword [esp + 0x14]
inc edx
push edx
push ebp
lea eax, [esp + 0x1008]
push str._sjs_d.js
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [esp + 0x1010]
push 0x4219d8
push ecx
call dword [sym.imp.MSVCR90.dll_fopen]
mov edx, dword [esp + 0x30]
mov edi, eax
push edi
push 1
push edx
push ebx
call dword [sym.imp.MSVCR90.dll_fwrite]
push edi
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 0x2c
mov eax, dword [esp + 0x14]
inc eax
cmp eax, 0x14
mov dword [esp + 0x14], eax
jl 0x4066a2
lea eax, [esp + 0x18]
push eax
mov ecx, esi
call fcn.00404130
movzx ecx, word [esp + 0x18]
mov edx, dword [0x42b814]
push 0x409
push ecx
push str.HTPL
push edx
call dword [sym.imp.KERNEL32.dll_FindResourceExA]
push eax
mov eax, dword [0x42b814]
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push ebp
lea ecx, [esp + 0xf00]
push ecx
mov edi, eax
call ebx
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcatA]
push str.__hp_hut.html
lea edx, [esp + 0xf00]
push edx
call ebp
movzx eax, byte [esi + 0x38dc]
mov ecx, dword [esp + 0x20]
push eax
mov eax, dword [esi + 0x38b4]
push ecx
mov ecx, dword [esi + 0x38b0]
lea edx, [esp + 0xf04]
push edx
push eax
push ecx
lea edx, [esp + 0x50]
push edx
push edi
lea ecx, [esp + 0x44]
call fcn.0041a590
cmp al, 1
jne 0x40680f
push str.file:__
lea edi, [esi + 0x30e0]
push edi
call ebx
lea eax, [esp + 0xefc]
push eax
push edi
call ebp
push 0
push 0
push 0
push 0
push edi
jmp 0x4068b4
push 0
push 0
push str.Could_not_construct_web_page_from_content_results_
mov ecx, esi
call sub.mfc90.dll_Ordinal_4502
lea ecx, [esp + 0x28]
mov byte [esp + 0x1110], 2
call fcn.00419d10
jmp 0x4068df
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x24]
push edx
lea ecx, [esp + 0x44]
call fcn.0041aff0
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
lea ecx, [esp + 0xefc]
push 0x4219d8
push ecx
mov ebp, eax
call dword [sym.imp.MSVCR90.dll_fopen]
mov edx, dword [esp + 0x28]
mov ebx, eax
push ebx
push 1
push edx
push ebp
call dword [sym.imp.MSVCR90.dll_fwrite]
push ebx
call dword [sym.imp.MSVCR90.dll_fclose]
mov eax, dword [esp + 0x30]
add esp, 0x1c
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push str.file:__
lea ebx, [esi + 0x30e0]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea ecx, [esp + 0xefc]
push ecx
push ebx
call edi
push 0
push 0
push 0
push 0
push ebx
lea ecx, [esi + 0x74]
call fcn.004190d0
lea ecx, [esp + 0x28]
mov byte [esp + 0x1110], 2
call fcn.00419d10
jmp 0x4068df
push 0
push 0
push str.Could_not_connect_to_Content_URL_Default_Content
mov ecx, esi
call sub.mfc90.dll_Ordinal_4502
lea ecx, [esp + 0x30]
mov byte [esp + 0x1110], 1
call fcn.004128e0
lea ecx, [esp + 0x3c]
mov byte [esp + 0x1110], 0
call fcn.0041a740
lea ecx, [esp + 0x1118]
mov dword [esp + 0x1110], 0xffffffff
call fcn.00401cb0
mov ecx, dword [esp + 0x1108]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x10f0]
xor ecx, esp
call fcn.0041bd34
add esp, 0x1100
ret 8