Function at 0x413871
Capabilities:
Check if file exists
Create directory
Get common file path
Get file attributes
Print debug messages

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4b95bc
mov eax, dword fs:[0]
push eax
sub esp, 0x400
mov eax, dword [0x4eb664]
xor eax, esp
mov dword [esp + 0x3f8], eax
push ebx
push esi
push edi
mov eax, dword [0x4eb664]
xor eax, esp
push eax
lea eax, [esp + 0x410]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [esp + 0x1c], ebx
xor esi, esi
cmp dword [ebx + 0x14], esi
je 0x413ed5
xor eax, eax
push 0x206
mov word [esp + 0x200], ax
lea eax, [esp + 0x202]
push esi
push eax
call fcn.004921d0
add esp, 0xc
lea eax, [esp + 0x1fc]
push 1
push 0x1a
push eax
push esi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea edi, [esp + 0x1fc]
sub edi, 2
mov ax, word [edi + 2]
add edi, 2
cmp ax, si
jne 0x4138ff
push 5
pop ecx
mov esi, str._flash_ksb
rep movsd dword es:[edi], dword [esi]
push 0
lea eax, [esp + 0x200]
push eax
movsw word es:[edi], word [esi]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea eax, [esp + 0x1fc]
push eax
lea ecx, [esp + 0x1e8]
call fcn.0040513a
and dword [esp + 0x418], 0
lea eax, [esp + 0x1fc]
push eax
lea ecx, [esp + 0x170]
call fcn.0040513a
mov esi, str.ksb_repair.cab
push esi
mov byte [esp + 0x41c], 1
call fcn.00405113
pop ecx
push eax
push esi
lea ecx, [esp + 0x174]
call fcn.004046dd
lea eax, [esp + 0x1fc]
push eax
lea ecx, [esp + 0x1d0]
call fcn.0040513a
mov esi, str.ksb_repair
push esi
mov byte [esp + 0x41c], 2
call fcn.00405113
pop ecx
push eax
push esi
lea ecx, [esp + 0x1d4]
call fcn.004046dd
push 1
push 2
lea ecx, [esp + 0xc4]
call fcn.00414fd9
mov byte [esp + 0x418], 3
cmp dword [esp + 0x180], 8
lea esi, [ebx + 4]
push 8
lea eax, [esp + 0x170]
cmovae eax, dword [esp + 0x170]
pop ebx
mov dword [esp + 0x20], eax
cmp dword [esi + 0x14], ebx
jb 0x4139f1
mov edi, dword [esi]
jmp 0x4139f3
mov edi, esi
push ecx
lea ecx, [esp + 0xc0]
call fcn.0041969c
lea ecx, [esp + 0xbc]
call fcn.00419a65
push dword [esp + 0x20]
mov edx, str.CrashRepair::StartRepair
push ecx
push str.__Download_File_is:
push ecx
push edi
push ecx
push str.__Download_Url_is:
push ecx
lea ecx, [esp + 0xdc]
call fcn.004179aa
pop ecx
push eax
call fcn.00417bf0
add esp, 0xc
push eax
call fcn.00417bf0
add esp, 0xc
push eax
call fcn.00417bf0
add esp, 0xc
push eax
call fcn.00417bf0
push eax
call fcn.00419b03
add esp, 0xc
lea eax, [esp + 0x19c]
push eax
lea ecx, [esp + 0xc0]
call fcn.0041508d
cmp dword [eax + 0x14], ebx
jb 0x413a76
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor edi, edi
push edi
push 1
lea ecx, [esp + 0x1a4]
call fcn.00405ac5
cmp dword [esi + 0x14], ebx
jb 0x413a95
mov esi, dword [esi]
push esi
lea ecx, [esp + 0x1b8]
call fcn.0040513a
lea eax, [esp + 0x16c]
push eax
lea eax, [esp + 0x1b8]
push eax
mov byte [esp + 0x420], 4
call fcn.00413f13
push edi
push 1
lea ecx, [esp + 0x1bc]
mov byte [esp + 0x420], 3
call fcn.00405ac5
cmp dword [esp + 0x180], ebx
lea eax, [esp + 0x16c]
cmovae eax, dword [esp + 0x16c]
push eax
lea ecx, [esp + 0x188]
call fcn.0040513a
cmp dword [esp + 0x198], ebx
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
lea eax, [esp + 0x184]
cmovae eax, dword [esp + 0x184]
push eax
call esi
push edi
cmp eax, 0xffffffff
push 1
lea ecx, [esp + 0x18c]
sete bl
call fcn.00405ac5
test bl, bl
jne 0x413e9c
cmp dword [esp + 0x1f8], 8
lea eax, [esp + 0x1e4]
cmovae eax, dword [esp + 0x1e4]
push eax
lea ecx, [esp + 0x1b8]
call fcn.0040513a
mov ecx, dword [esp + 0x1c]
push edi
push 0x4145ee
lea eax, [esp + 0x1bc]
push eax
mov byte [esp + 0x424], 5
call fcn.0041436e
push edi
push 1
lea ecx, [esp + 0x1bc]
call fcn.00405ac5
lea ecx, [esp + 0x1cc]
call fcn.0041360a
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], edi
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x170]
push eax
lea eax, [esp + 0x1d4]
push eax
mov byte [esp + 0x424], 6
call fcn.004141c0
test eax, eax
je 0x413e93
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
cmp ecx, eax
je 0x413e93
sub eax, ecx
push 0x18
cdq
pop edi
idiv edi
cmp eax, 1
ja 0x413e91
cmp dword [ecx + 0x14], 0x10
jb 0x413bf2
mov ecx, dword [ecx]
push ecx
lea ecx, [esp + 0x1a0]
call fcn.00407395
push 7
pop ebx
lea edx, [esp + 0x19c]
lea ecx, [esp + 0x1b4]
mov byte [esp + 0x418], bl
call fcn.004137e3
lea ecx, [esp + 0x19c]
mov byte [esp + 0x418], 9
call fcn.004073c4
and dword [esp + 0x194], 0
xor eax, eax
push 0xffffffffffffffff
push eax
mov word [esp + 0x18c], ax
lea eax, [esp + 0x1d4]
push eax
lea ecx, [esp + 0x190]
mov dword [esp + 0x1a4], ebx
call fcn.00405a06
mov edi, 0x4d3c8c
push edi
mov byte [esp + 0x41c], 0xa
call fcn.00405113
pop ecx
push eax
push edi
lea ecx, [esp + 0x18c]
call fcn.004046dd
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x1bc]
push eax
lea ecx, [esp + 0x190]
call fcn.0040483a
and dword [esp + 0x164], 0
xor eax, eax
push 0xffffffffffffffff
push eax
mov word [esp + 0x15c], ax
lea eax, [esp + 0x1ec]
push eax
lea ecx, [esp + 0x160]
mov dword [esp + 0x174], ebx
call fcn.00405a06
push edi
mov byte [esp + 0x41c], 0xb
call fcn.00405113
pop ecx
push eax
push edi
lea ecx, [esp + 0x15c]
call fcn.004046dd
push 0xffffffffffffffff
xor edi, edi
push edi
lea eax, [esp + 0x1bc]
push eax
lea ecx, [esp + 0x160]
call fcn.0040483a
lea edx, [esp + 0x154]
lea ecx, [esp + 0x184]
call fcn.004136d4
push 8
pop ebx
cmp dword [esp + 0x168], ebx
lea eax, [esp + 0x154]
cmovae eax, dword [esp + 0x154]
push eax
call esi
cmp eax, 0xffffffff
je 0x413e10
call fcn.004147fa
lea eax, [esp + 0x154]
push eax
call fcn.00414614
mov edi, eax
call fcn.00414a28
push 1
push 2
lea ecx, [esp + 0x2c]
call fcn.00414fd9
mov byte [esp + 0x418], 0xc
cmp dword [esp + 0x168], ebx
push ecx
lea esi, [esp + 0x158]
cmovae esi, dword [esp + 0x158]
lea ecx, [esp + 0x28]
call fcn.0041969c
lea ecx, [esp + 0x24]
call fcn.00419a65
push edi
push ecx
push str.__Register_result:
push ecx
push esi
push ecx
push str.__Register_File_is:
push ecx
mov edx, str.CrashRepair::StartRepair
lea ecx, [esp + 0x44]
call fcn.004179aa
pop ecx
push eax
call fcn.00417bf0
add esp, 0xc
push eax
call fcn.00417bf0
add esp, 0xc
push eax
call fcn.00417bf0
add esp, 0xc
mov ecx, eax
call fcn.00414c18
push eax
call fcn.00419b03
pop ecx
lea eax, [esp + 0x19c]
push eax
lea ecx, [esp + 0x28]
call fcn.0041508d
cmp dword [eax + 0x14], ebx
jb 0x413def
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor edi, edi
push edi
push 1
lea ecx, [esp + 0x1a4]
call fcn.00405ac5
lea ecx, [esp + 0x24]
call fcn.00413ef9
push edi
push 1
lea ecx, [esp + 0x15c]
call fcn.00405ac5
push edi
push 1
lea ecx, [esp + 0x18c]
call fcn.00405ac5
push edi
push 1
lea ecx, [esp + 0x1bc]
mov byte [esp + 0x420], 6
call fcn.00405ac5
lea ecx, [esp + 0x1cc]
call fcn.0041360a
cmp dword [esp + 0x180], ebx
lea eax, [esp + 0x16c]
cmovae eax, dword [esp + 0x16c]
push eax
lea ecx, [esp + 0x1a0]
call fcn.0040513a
lea ecx, [esp + 0x19c]
call fcn.0041360a
push edi
push 1
lea ecx, [esp + 0x1a4]
call fcn.00405ac5
jmp 0x413e93
xor edi, edi
lea ecx, [esp + 0x10]
call fcn.00415773
lea ecx, [esp + 0xbc]
call fcn.00413ef9
push edi
push 1
lea ecx, [esp + 0x1d4]
call fcn.00405ac5
push edi
push 1
lea ecx, [esp + 0x174]
call fcn.00405ac5
push edi
push 1
lea ecx, [esp + 0x1ec]
call fcn.00405ac5
mov ecx, dword [esp + 0x410]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3f8]
xor ecx, esp
call fcn.0048f059
mov esp, ebp
pop ebp
ret