Function at 0x4060a0
Capabilities:
Check if file exists
Enumerate files on windows
Get file size
Read file on windows
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x41e8bb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x57c
push esi
mov esi, ecx
mov dword [esp + 0xc], esi
call fcn.00405f50
test eax, eax
je 0x4060e5
xor eax, eax
pop esi
mov ecx, dword [esp + 0x57c]
mov dword fs:[0], ecx
add esp, 0x588
ret 4
mov eax, dword [esi + 0x1c]
push ebx
mov ebx, 0x10
cmp eax, ebx
jb 0x4060f7
mov eax, dword [esi + 8]
jmp 0x4060fa
lea eax, [esi + 8]
push edi
push eax
lea ecx, [esp + 0x10]
call fcn.00403550
push 0xc
push 0x41fbf8
lea ecx, [esp + 0x14]
mov dword [esp + 0x598], 0
call fcn.004033d0
xor eax, eax
mov byte [esp + 0x48], 0
mov ecx, 0xff
lea edi, [esp + 0x49]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
cmp dword [esi + 0x1c], ebx
jb 0x40613f
mov ecx, dword [esi + 8]
jmp 0x406142
lea ecx, [esi + 8]
lea edx, [esp + 0x48]
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x406146
lea edi, [esp + 0x48]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x406155
mov eax, dword [0x41fbf8]
mov ecx, dword [0x41fbfc]
mov edx, dword [0x41fc00]
mov dword [edi], eax
mov al, byte [0x41fc04]
mov dword [edi + 4], ecx
lea ecx, [esp + 0x48]
mov dword [edi + 8], edx
push ecx
mov byte [edi + 0xc], al
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x4061bd
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
mov dword [esp + 0x590], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4061b6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
xor eax, eax
jmp 0x406480
cmp dword [esi + 0x1c], ebx
jb 0x4061c7
mov ecx, dword [esi + 8]
jmp 0x4061ca
lea ecx, [esi + 8]
lea edx, [esp + 0x48]
mov edi, edi
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x4061d0
push ebp
mov ebp, dword [sym.imp.SHLWAPI.dll_PathCombineA]
push 0x41fc74
lea eax, [esp + 0x50]
push eax
mov ecx, eax
push ecx
call ebp
lea edx, [esp + 0x44c]
push edx
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
mov dword [esp + 0x14], eax
lea ecx, [ecx]
test byte [esp + 0x44c], 0x10
je 0x40642f
cmp byte [esp + 0x478], 0x2e
je 0x40642f
mov eax, dword [esi + 0x1c]
mov edi, 0x10
cmp eax, edi
jb 0x40623d
mov ecx, dword [esi + 8]
jmp 0x406240
lea ecx, [esi + 8]
lea edx, [esp + 0x4c]
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x406244
lea ecx, [esp + 0x478]
push ecx
lea edx, [esp + 0x50]
push edx
mov eax, edx
push eax
call ebp
push str.ConfigConfig.ini
lea ecx, [esp + 0x50]
push ecx
mov edx, ecx
push edx
call ebp
lea eax, [esp + 0x4c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x4062a8
mov al, byte [esp + 0x59c]
test al, al
je 0x406295
lea ecx, [esp + 0x4c]
push ecx
push str.ThunderAgent.Agent.1
jmp 0x40629c
lea edx, [esp + 0x4c]
push edx
push 0
push str.Downloader
push str.Download
call ebx
cmp dword [esi + 0x1c], edi
jb 0x4062b2
mov ecx, dword [esi + 8]
jmp 0x4062b5
lea ecx, [esi + 8]
lea edx, [esp + 0x4c]
lea esp, [esp]
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x4062c0
lea eax, [esp + 0x478]
push eax
lea ecx, [esp + 0x50]
push ecx
mov edx, ecx
push edx
call ebp
push str.ConfigPlugins.ini
lea eax, [esp + 0x50]
push eax
mov ecx, eax
push ecx
call ebp
lea edx, [esp + 0x4c]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x40642f
push 0
push 0x80
push 3
push 0
push 3
push 0xc0000000
lea eax, [esp + 0x64]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x4063d6
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
lea ecx, [ebp + 1]
push ecx
call fcn.00418532
add esp, 4
mov esi, eax
xor edx, edx
lea eax, [esp + 0x24]
push eax
mov dword [esp + 0x28], edx
lea ecx, [esp + 0x24]
push ecx
mov dword [esp + 0x30], edx
push ebp
mov dword [esp + 0x38], edx
push esi
mov dword [esp + 0x40], edx
push edi
mov dword [esp + 0x34], 0
mov dword [esp + 0x48], edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov byte [esi + ebp], 0
cmp byte [esi], 0xef
jne 0x4063bc
cmp byte [esi + 1], 0xbb
jne 0x4063bc
cmp byte [esi + 2], 0xbf
jne 0x4063bc
xor edx, edx
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], edx
lea eax, [esp + 0x38]
push eax
mov dword [esp + 0x48], edx
lea ecx, [esp + 0x20]
push ecx
add ebp, 0xfffffffe
mov dword [esp + 0x50], edx
push ebp
lea edx, [esi + 3]
push edx
push edi
mov dword [esp + 0x30], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call fcn.00418537
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebp, dword [sym.imp.SHLWAPI.dll_PathCombineA]
mov esi, dword [esp + 0x18]
mov al, byte [esp + 0x59c]
test al, al
je 0x406403
lea eax, [esp + 0x4c]
push eax
push 0x41f65c
push 0x41fc20
push str.Paths
call ebx
lea ecx, [esp + 0x4c]
push ecx
push 0x41f65c
jmp 0x406423
lea edx, [esp + 0x4c]
push edx
push 0x41f6ec
push 0x41fc20
push str.Paths
call ebx
lea eax, [esp + 0x4c]
push eax
push 0x41f6ec
push str.ThunderAtOnce
push str.Paths
call ebx
mov edi, dword [esp + 0x14]
lea ecx, [esp + 0x44c]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x406210
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov dword [esp + 0x594], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
pop ebp
jg 0x40647b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, 1
mov ecx, dword [esp + 0x588]
pop edi
pop ebx
pop esi
mov dword fs:[0], ecx
add esp, 0x588
ret 4