Function at 0x4089f0
Capabilities:
Check if file exists
Create directory
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47aa6b
mov eax, dword fs:[0]
push eax
sub esp, 0xa0
mov eax, dword [0x496684]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea ebx, [ebp - 0x9c]
call fcn.00407800
xor ebx, ebx
mov dword [ebp - 4], ebx
push 0xffffffffffffffff
push ebx
lea eax, [ebp - 0x9c]
mov edi, 0xf
push eax
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x38], ebx
mov byte [ebp - 0x48], bl
call fcn.00405160
mov byte [ebp - 4], 1
push 1
mov eax, 0x488730
lea ecx, [ebp - 0x48]
call fcn.00402d60
push 9
mov eax, str.3rdParty_
lea ecx, [ebp - 0x48]
call fcn.00402d60
mov eax, dword [ebp - 0x48]
mov esi, 0x10
cmp dword [ebp - 0x34], esi
jae 0x408a80
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x408a9e
mov eax, dword [ebp - 0x48]
cmp dword [ebp - 0x34], esi
jae 0x408a96
lea eax, [ebp - 0x48]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov dword [ebp - 0xa4], 1
mov dword [ebp - 0xa8], 0x497e60
mov ecx, dword [ebp - 0xa8]
mov edx, dword [ecx]
push edx
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x2c]
push ecx
call fcn.0040c2f0
add esp, 0xc
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x2c]
cmp dword [ebp - 0x18], esi
jae 0x408ada
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x408d29
push ebx
push 0x4886f6
lea ecx, [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x70], ebx
mov byte [ebp - 0x80], bl
call fcn.004054e0
mov byte [ebp - 4], 3
push ebx
push 0x4886f6
lea ecx, [ebp - 0x64]
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x54], ebx
mov byte [ebp - 0x64], bl
call fcn.004054e0
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x2c]
cmp dword [ebp - 0x18], esi
jae 0x408b2a
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionA]
mov ecx, eax
lea esi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
cmp dl, bl
jne 0x408b36
sub ecx, esi
push ecx
push eax
lea ecx, [ebp - 0x64]
call fcn.004054e0
mov esi, dword [ebp - 0x54]
mov eax, esi
cmp esi, 4
jb 0x408b58
mov eax, 4
cmp dword [ebp - 0x50], 0x10
mov ecx, dword [ebp - 0x64]
jae 0x408b64
lea ecx, [ebp - 0x64]
push eax
push str..txt
push ecx
call fcn.004043d0
add esp, 0xc
cmp eax, ebx
jne 0x408b8b
cmp esi, 4
jae 0x408b81
or eax, 0xffffffff
jmp 0x408b89
xor eax, eax
cmp esi, 4
setne al
cmp eax, ebx
sete al
cmp al, bl
je 0x408cae
cmp dword [ebp - 0x18], 0x10
mov eax, dword [ebp - 0x2c]
jae 0x408ba2
lea eax, [ebp - 0x2c]
push ebx
push 0x80
push 3
push ebx
push 1
push bind
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, ebx
je 0x408ca3
lea edx, [ebp - 0xac]
push edx
push edi
mov dword [ebp - 0xa0], ebx
mov dword [ebp - 0xac], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0xa0], eax
cmp eax, 0xffffffff
jne 0x408bfb
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 0xa4], ebx
inc eax
push eax
call fcn.0042bc4e
mov esi, eax
mov eax, dword [ebp - 0xa0]
inc eax
push eax
push ebx
push esi
call fcn.004316d0
mov edx, dword [ebp - 0xa0]
add esp, 0x10
push ebx
lea ecx, [ebp - 0xa0]
push ecx
push edx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0xa0]
push eax
mov eax, esi
lea ecx, [ebp - 0x80]
call fcn.00402d60
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.0042d668
mov esi, dword [ebp - 0x70]
add esp, 4
mov eax, esi
cmp esi, 6
jb 0x408c5d
mov eax, 6
cmp dword [ebp - 0x6c], 0x10
mov ecx, dword [ebp - 0x80]
jae 0x408c69
lea ecx, [ebp - 0x80]
push eax
push str.111111
push ecx
call fcn.004043d0
add esp, 0xc
cmp eax, ebx
jne 0x408c90
cmp esi, 6
jae 0x408c86
or eax, 0xffffffff
jmp 0x408c8e
xor eax, eax
cmp esi, 6
setne al
cmp eax, ebx
sete al
cmp al, bl
sete al
mov edi, 0xf
cmp al, bl
je 0x408cae
jmp 0x408ca8
mov edi, 0xf
mov dword [ebp - 0xa4], ebx
mov byte [ebp - 4], 3
mov esi, 0x10
cmp dword [ebp - 0x50], esi
jb 0x408cc8
mov ecx, dword [ebp - 0x64]
push ecx
call fcn.0042ca67
add esp, 4
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x54], ebx
mov byte [ebp - 0x64], bl
mov byte [ebp - 4], 2
cmp dword [ebp - 0x6c], esi
jb 0x408ce6
mov edx, dword [ebp - 0x80]
push edx
call fcn.0042ca67
add esp, 4
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x70], ebx
mov byte [ebp - 0x80], bl
mov byte [ebp - 4], 1
cmp dword [ebp - 0x18], esi
jb 0x408d04
mov eax, dword [ebp - 0x2c]
push eax
call fcn.0042ca67
add esp, 4
mov eax, dword [ebp - 0xa8]
add eax, 4
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 0x2c], bl
mov dword [ebp - 0xa8], eax
cmp eax, 0x497e80
jl 0x408ab2
jmp 0x408d4d
mov dword [ebp - 0xa4], ebx
mov byte [ebp - 4], 1
cmp dword [ebp - 0x18], esi
jb 0x408d44
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.0042ca67
add esp, 4
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 0x2c], bl
mov byte [ebp - 4], bl
cmp dword [ebp - 0x34], esi
jb 0x408d61
mov edx, dword [ebp - 0x48]
push edx
call fcn.0042ca67
add esp, 4
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x38], ebx
mov byte [ebp - 0x48], bl
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x88], esi
jb 0x408d88
mov eax, dword [ebp - 0x9c]
push eax
call fcn.0042ca67
add esp, 4
mov eax, dword [ebp - 0xa4]
mov dword [ebp - 0x88], edi
mov dword [ebp - 0x8c], ebx
mov byte [ebp - 0x9c], bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042ca72
mov esp, ebp
pop ebp
ret