Function at 0x40a84b
Capabilities:
Check if file exists
Create directory
Delete file
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x424489
mov eax, dword fs:[0]
push eax
sub esp, 0x60
mov eax, dword [0x42f050]
xor eax, esp
mov dword [esp + 0x58], eax
push ebx
push esi
push edi
mov eax, dword [0x42f050]
xor eax, esp
push eax
lea eax, [esp + 0x70]
mov dword fs:[0], eax
mov ebx, ecx
lea esi, [ebx + 0x94]
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
xor edi, edi
cmp eax, edi
mov dword [esp + 0x28], ebx
je 0x40a9b2
mov eax, dword [ebx + 0x98]
cmp dword [eax - 0xc], edi
je 0x40a9b2
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40a8ce
mov ebx, dword [ebx + 0x98]
push edi
push ebx
push edi
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
test eax, eax
jne 0x40a9b2
mov eax, dword [0x4312e4]
mov ebx, 0x4312e4
mov ecx, ebx
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x14], eax
mov dword [esp + 0x78], edi
mov eax, dword [0x4312e4]
mov ecx, ebx
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x18], eax
mov edi, 0x104
mov byte [esp + 0x78], 1
mov eax, dword [esi]
push edi
push edi
lea esi, [esp + 0x20]
mov dword [esp + 0x28], eax
call fcn.00404fbb
push eax
push edi
push edi
lea esi, [esp + 0x24]
call fcn.00404fbb
push eax
xor eax, eax
push eax
push eax
push eax
push eax
push dword [esp + 0x40]
call fcn.0040f13d
mov eax, dword [esp + 0x38]
add esp, 0x24
call fcn.00404fa4
mov edx, esi
call fcn.00404c37
mov eax, dword [esp + 0x18]
call fcn.00404fa4
lea edx, [esp + 0x18]
call fcn.00404c37
push 6
pop ecx
mov esi, str._:____
lea edi, [esp + 0x40]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
xor edi, edi
cmp word [esp + 0x40], di
je 0x40a994
movzx eax, word [esp + 0x40]
push eax
lea esi, [esp + 0x18]
call fcn.0040681e
test eax, eax
jl 0x40a989
inc eax
mov ecx, esi
call fcn.0040b77e
movzx eax, word [esp + edi*2 + 0x42]
inc edi
test ax, ax
jne 0x40a973
mov edi, dword [esp + 0x14]
cmp dword [edi - 0xc], 0
jne 0x40a9d2
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
call fcn.00404c04
lea eax, [edi - 0x10]
call fcn.00404c04
xor al, al
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x58]
xor ecx, esp
call fcn.0040db28
mov esp, ebp
pop ebp
ret
mov esi, dword [esp + 0x28]
add esi, 0x9c
mov eax, dword [esi]
cmp dword [eax - 0xc], 0
je 0x40a9f3
mov eax, esi
lea edi, [esp + 0x14]
call fcn.004038f2
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x28]
mov eax, dword [eax + 0x98]
sub eax, 0x10
call fcn.0040402e
add eax, 0x10
mov dword [esp + 0x1c], eax
mov byte [esp + 0x78], 2
push dword [edi - 0xc]
lea eax, [esp + 0x20]
push edi
call fcn.00403c7c
mov eax, dword [esi]
cmp dword [eax - 0xc], 0
jne 0x40aa4c
mov esi, dword [esp + 0x18]
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x40aa2f
sub eax, edx
sar eax, 1
je 0x40aa4c
push dword [esi - 0xc]
lea eax, [esp + 0x20]
push esi
call fcn.00403c7c
push 0x429f60
lea eax, [esp + 0x20]
push eax
call fcn.004062e6
lea eax, [esp + 0x24]
push str..cfg
push eax
lea ecx, [esp + 0x24]
call fcn.004068ba
mov byte [esp + 0x80], 3
mov edi, dword [esp + 0x24]
add esp, 4
add edi, 0xfffffff0
mov eax, edi
mov dword [esp + 0x3c], esp
mov esi, esp
mov dword [esp + 0x24], edi
call fcn.0040402e
push dword [esp + 0x2c]
add eax, 0x10
mov dword [esi], eax
call fcn.0040b082
mov byte [esp + 0x2f], al
mov eax, dword [0x4312e4]
mov ecx, ebx
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x3c], eax
mov byte [esp + 0x78], 4
and dword [esp + 0x34], 0
mov eax, 0x6978
push 0xa
pop ebx
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], 0x2328
mov dword [esp + 0x64], 0xbb8
mov esi, dword [esp + 0x28]
lea ecx, [esp + 0x3c]
push ecx
add esi, 0x94
mov eax, dword [esi]
lea ecx, [esp + 0x38]
push ecx
push eax
mov dword [esp + 0x44], esi
call fcn.00405693
add esp, 0xc
test al, al
je 0x40ab24
cmp dword [esp + 0x34], 0
ja 0x40ab33
dec ebx
js 0x40ab37
push dword [esp + ebx*4 + 0x40]
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40aaf6
test ebx, ebx
jge 0x40abb2
cmp dword [0x43059c], 0xffffffff
je 0x40ab7b
and dword [esp + 0x30], 0
push str.CFileDownloadJob_StartJob_GetFileContentLength_try_10_times_but_Failed_n
lea eax, [esp + 0x24]
push eax
call fcn.004036ef
push 0
lea eax, [esp + 0x34]
push eax
mov eax, dword [esp + 0x28]
push dword [eax - 0xc]
push eax
push dword [0x43059c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
call fcn.00404c04
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
call fcn.00404c04
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
call fcn.00404c04
mov eax, edi
call fcn.00404c04
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
call fcn.00404c04
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
jmp 0x40a9ad
cmp byte [esp + 0x2f], 0
mov ebx, dword [esp + 0x3c]
jne 0x40ac82
cmp dword [ebx - 0xc], 0
je 0x40ac4e
lea eax, [esp + 0x3c]
mov edi, esi
call fcn.004038f2
mov eax, dword [esi]
sub eax, 0x10
call fcn.0040402e
lea edi, [eax + 0x10]
mov dword [esp + 0x30], edi
push 0x2f
lea esi, [esp + 0x34]
mov byte [esp + 0x7c], 5
call fcn.0040681e
test eax, eax
jl 0x40ac3d
inc eax
mov ecx, esi
call fcn.0040b77e
mov edi, dword [esp + 0x30]
push str.error.html
push edi
call fcn.0040df4d
test eax, eax
pop ecx
pop ecx
jne 0x40ac3d
lea eax, [edi - 0x10]
call fcn.00404c04
lea eax, [ebx - 0x10]
call fcn.00404c04
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
call fcn.00404c04
mov eax, dword [esp + 0x20]
jmp 0x40ab95
lea eax, [edi - 0x10]
mov byte [esp + 0x78], 4
call fcn.00404c04
mov esi, dword [esp + 0x38]
push dword [esp + 0x1c]
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
call edi
push dword [esp + 0x24]
call edi
mov eax, dword [esp + 0x20]
push ecx
mov dword [esp + 0x3c], esp
mov edi, esp
call fcn.0040402e
push dword [esp + 0x2c]
add eax, 0x10
mov dword [edi], eax
call fcn.0040af98
mov edi, dword [esp + 0x20]
push dword [esp + 0x34]
lea eax, [esp + 0x28]
push eax
push dword [esp + 0x30]
lea ecx, [esp + 0x28]
call fcn.0040ad24
test al, al
jne 0x40aca4
lea eax, [ebx - 0x10]
jmp 0x40ab82
push dword [esp + 0x34]
mov ecx, dword [esp + 0x2c]
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x24]
push eax
push esi
call fcn.0040b16a
test al, al
lea eax, [ebx - 0x10]
je 0x40ab82
call fcn.00404c04
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
call fcn.00404c04
mov eax, edi
call fcn.00404c04
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
call fcn.00404c04
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
call fcn.00404c04
mov al, 1
jmp 0x40a9b4