Function at 0x10059900
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10213e30
mov eax, dword fs:[0]
push eax
sub esp, 0x248
mov eax, dword [0x10250150]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x24c], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x250], eax
xor esi, esi
mov byte [ebp - 0x21e], 0
push 0x208
push esi
lea eax, [ebp - 0x21c]
push eax
call fcn.102134e7
add esp, 0xc
mov byte [ebp - 0x21f], 1
mov byte [ebp - 0x21d], 0
mov dword [ebp - 0x22c], esi
mov eax, dword [ebp - 0x24c]
mov dword [eax], esi
mov eax, dword [ebp - 0x250]
mov dword [eax], esi
test ebx, ebx
jne 0x10059997
test edi, edi
je 0x10059bfd
mov dword [ebp - 0x248], esi
mov dword [ebp - 4], 0
test ebx, ebx
jne 0x10059c04
push edi
call dword [sym.imp.SHLWAPI.dll_StrDupW]
mov ecx, eax
mov dword [ebp - 0x248], ecx
mov dword [ebp - 0x224], eax
mov dword [ebp - 0x238], ecx
mov esi, ecx
mov dword [ebp - 0x234], esi
mov edi, ecx
mov dword [ebp - 0x23c], edi
cmp word [ecx], 0x22
jne 0x10059a20
xor al, al
mov byte [ebp - 0x21f], al
mov byte [ebp - 0x23d], al
lea edi, [ecx + 2]
mov dword [ebp - 0x23c], edi
mov ecx, edi
mov dword [ebp - 0x238], ecx
lea esp, [esp]
movzx eax, word [edi]
test ax, ax
je 0x10059a55
cmp eax, 0x22
je 0x10059a4d
add edi, 2
mov dword [ebp - 0x23c], edi
mov esi, edi
mov dword [ebp - 0x234], esi
jmp 0x10059a00
mov ecx, eax
mov dword [ebp - 0x238], ecx
movzx eax, word [edi]
test ax, ax
je 0x10059a55
cmp eax, 0x20
je 0x10059a4d
cmp eax, 9
je 0x10059a4d
add edi, 2
mov dword [ebp - 0x23c], edi
mov esi, edi
mov dword [ebp - 0x234], esi
jmp 0x10059a28
mov esi, edi
mov dword [ebp - 0x234], esi
movzx eax, word [esi]
mov dword [ebp - 0x230], eax
xor eax, eax
mov word [esi], ax
push eax
lea eax, [ebp - 0x21c]
push eax
push 0x104
push str..exe
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_SearchPathW]
mov ebx, eax
add ebx, ebx
mov dword [ebp - 0x244], ebx
je 0x10059ab6
cmp ebx, 0x208
jae 0x10059b1a
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x10059b0c
test al, 0x10
je 0x10059b0c
mov dword [ebp - 0x244], 0
mov eax, dword [ebp - 0x230]
mov word [esi], ax
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x238], eax
cmp word [edi], 0
je 0x10059bf0
cmp byte [ebp - 0x21f], 0
je 0x10059bf0
add edi, 2
mov dword [ebp - 0x23c], edi
mov esi, edi
mov dword [ebp - 0x234], esi
mov al, 1
mov byte [ebp - 0x21d], al
mov byte [ebp - 0x225], al
mov eax, dword [ebp - 0x224]
jmp 0x10059a20
inc ebx
mov dword [ebp - 0x244], ebx
inc ebx
mov dword [ebp - 0x244], ebx
test ebx, ebx
je 0x10059ab6
cmp ebx, 0x208
jae 0x10059ab6
mov eax, dword [ebp - 0x230]
mov word [esi], ax
lea ebx, [ebp - 0x21c]
mov dword [ebp - 0x238], ebx
cmp byte [ebp - 0x21d], 0
je 0x10059c7a
mov eax, dword [ebp - 0x224]
mov ecx, eax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10059b53
sub ecx, edx
sar ecx, 1
lea edi, [ecx*2 + 6]
mov dword [ebp - 0x230], edi
push edi
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x22c], eax
test eax, eax
je 0x10059c60
push 0x10220eb8
push edi
push eax
call fcn.1005a910
cmp byte [ebp - 0x21d], 0
je 0x10059c3c
movzx edi, word [esi]
xor eax, eax
mov word [esi], ax
push dword [ebp - 0x224]
push dword [ebp - 0x230]
push dword [ebp - 0x22c]
call fcn.1005a860
push 0x10220eb8
push dword [ebp - 0x230]
push dword [ebp - 0x22c]
call fcn.1005a860
mov word [esi], di
mov eax, dword [ebp - 0x22c]
mov edi, dword [ebp - 0x230]
push esi
push edi
push eax
call fcn.1005a860
jmp 0x10059c7a
mov eax, dword [ebp - 0x248]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor eax, eax
jmp 0x10059d07
push ebx
call fcn.100598c0
test eax, eax
je 0x10059bfd
push ebx
call fcn.10034c50
test eax, eax
jne 0x10059bfd
test edi, edi
je 0x10059c21
cmp word [edi], ax
jne 0x10059c80
mov al, 1
mov byte [ebp - 0x21e], al
mov byte [ebp - 0x226], al
mov eax, ebx
mov dword [ebp - 0x224], eax
jmp 0x10059b4e
push dword [ebp - 0x224]
push edi
mov esi, dword [ebp - 0x22c]
push esi
call fcn.1005a860
mov eax, esi
mov esi, 0x10220eb8
push esi
push edi
push eax
call fcn.1005a860
jmp 0x10059c7a
xor al, al
mov byte [ebp - 0x21d], al
mov byte [ebp - 0x225], al
mov byte [ebp - 0x21e], al
mov byte [ebp - 0x226], al
mov edi, dword [ebp - 0x224]
push ebx
mov ebx, dword [sym.imp.SHLWAPI.dll_StrDupW]
call ebx
mov ecx, dword [ebp - 0x24c]
mov dword [ecx], eax
cmp byte [ebp - 0x21d], 0
jne 0x10059ca3
cmp byte [ebp - 0x21e], 0
je 0x10059ca9
mov edi, dword [ebp - 0x22c]
push edi
call ebx
mov ecx, dword [ebp - 0x250]
mov dword [ecx], eax
mov edi, 1
mov dword [ebp - 0x254], edi
mov dword [ebp - 4], 0xffffffff
jmp 0x10059ce5
mov eax, dword [ebp - 0x248]
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
test eax, eax
je 0x10059cf8
push eax
call esi
mov eax, dword [ebp - 0x22c]
test eax, eax
je 0x10059d05
push eax
call esi
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.10212f74
mov esp, ebp
pop ebp
ret