Function at 0x4596f0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55a1d1
mov eax, dword fs:[0]
push eax
sub esp, 0x178
mov eax, dword [0x5b327c]
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
mov esi, dword [ebp + 8]
mov eax, esi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x178], edi
mov byte [ebp - 0x159], 0
cmp dword [esi + 0x14], 8
jb 0x45973b
mov eax, dword [esi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x459d15
cmp dword [edi + 0x10], 0
lea eax, [edi + 0x10]
mov dword [ebp - 0x184], eax
je 0x459d15
push 0xff
lea eax, [ebp - 0x110]
push 0
push eax
call fcn.0050c770
add esp, 0xc
cmp dword [esi + 0x14], 8
jb 0x45977b
mov esi, dword [esi]
push 0xff
lea eax, [ebp - 0x110]
push eax
push esi
call fcn.004fde90
add esp, 0xc
cmp eax, 1
jne 0x459d15
push 0xfde9
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x158]
push eax
call fcn.0047ba60
add esp, 0xc
xor eax, eax
mov dword [ebp - 4], 0
mov ebx, 7
mov dword [ebp - 0x170], eax
mov dword [ebp - 0x118], eax
mov dword [ebp - 0x174], ebx
mov dword [ebp - 0x114], ebx
mov word [ebp - 0x128], ax
cmp dword [ebp - 0x144], 8
lea eax, [ebp - 0x158]
lea ecx, [ebp - 0x158]
mov byte [ebp - 4], 1
cmovae eax, dword [ebp - 0x158]
cmovae ecx, dword [ebp - 0x158]
mov dword [ebp - 0x160], eax
mov eax, dword [ebp - 0x148]
lea ecx, [ecx + eax*2]
mov eax, dword [ebp - 0x160]
mov dword [ebp - 0x17c], ecx
cmp eax, ecx
je 0x4599dc
mov edi, dword [ebp - 0x128]
xor esi, esi
movzx eax, word [eax]
push eax
call fcn.0051e971
add esp, 4
movzx ecx, ax
mov dword [ebp - 0x168], ecx
cmp esi, ebx
jae 0x45988d
lea eax, [esi + 1]
cmp ebx, 8
mov dword [ebp - 0x118], eax
lea eax, [ebp - 0x128]
cmovae eax, edi
mov word [eax + esi*2], cx
xor ecx, ecx
mov word [eax + esi*2 + 2], cx
mov ebx, dword [ebp - 0x114]
mov esi, dword [ebp - 0x118]
mov edi, dword [ebp - 0x128]
mov dword [ebp - 0x174], ebx
mov dword [ebp - 0x170], esi
jmp 0x4599b9
mov ecx, esi
mov eax, SysReAllocString
sub eax, ecx
mov dword [ebp - 0x164], ecx
cmp eax, 1
jb 0x459d37
lea eax, [ecx + 1]
mov esi, ebx
mov ebx, eax
mov dword [ebp - 0x170], eax
or ebx, 7
mov dword [ebp - 0x180], esi
cmp ebx, 0x7ffffffe
jbe 0x4598ca
mov ebx, SysReAllocString
jmp 0x4598e8
mov ecx, esi
mov eax, SysReAllocString
shr ecx, 1
sub eax, ecx
cmp esi, eax
jbe 0x4598e0
mov ebx, SysReAllocString
jmp 0x4598e8
lea eax, [ecx + esi]
cmp ebx, eax
cmovb ebx, eax
lea eax, [ebx + 1]
mov dword [ebp - 0x174], ebx
push eax
lea ecx, [ebp - 0x128]
call fcn.00418930
mov ecx, dword [ebp - 0x170]
cmp esi, 8
mov esi, dword [ebp - 0x164]
mov dword [ebp - 0x16c], eax
mov dword [ebp - 0x118], ecx
mov dword [ebp - 0x114], ebx
jb 0x459981
add esi, esi
push esi
push edi
push eax
call fcn.0050d1a0
mov eax, dword [ebp - 0x16c]
add esp, 0xc
mov ecx, dword [ebp - 0x168]
mov word [esi + eax], cx
xor ecx, ecx
mov word [esi + eax + 2], cx
mov eax, dword [ebp - 0x180]
lea ecx, [eax*2 + 2]
mov eax, edi
cmp ecx, 0x1000
jb 0x45996f
mov edi, dword [edi - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x459d3c
push ecx
push edi
call fcn.0046282d
mov edi, dword [ebp - 0x16c]
add esp, 8
jmp 0x4599ad
add esi, esi
lea ecx, [ebp - 0x128]
push esi
push ecx
push eax
call fcn.0050d1a0
mov eax, dword [ebp - 0x16c]
add esp, 0xc
mov ecx, dword [ebp - 0x168]
mov edi, eax
mov word [esi + eax], cx
xor ecx, ecx
mov word [esi + eax + 2], cx
mov esi, dword [ebp - 0x170]
mov dword [ebp - 0x128], edi
mov eax, dword [ebp - 0x160]
add eax, 2
mov dword [ebp - 0x168], edi
mov dword [ebp - 0x160], eax
cmp eax, dword [ebp - 0x17c]
jne 0x459831
jmp 0x4599e8
mov eax, dword [ebp - 0x128]
mov dword [ebp - 0x168], eax
xor esi, esi
mov edi, 7
xor eax, eax
mov dword [ebp - 0x16c], esi
mov dword [ebp - 0x130], esi
mov dword [ebp - 0x12c], edi
mov word [ebp - 0x140], ax
mov edx, dword [ebp - 0x178]
mov ecx, edx
mov byte [ebp - 4], 2
mov dword [ebp - 0x164], edx
cmp dword [edx + 0x14], 8
jb 0x459a2c
mov ecx, dword [edx]
mov edx, ecx
mov dword [ebp - 0x164], ecx
mov eax, dword [ebp - 0x184]
mov ebx, dword [ebp - 0x140]
mov eax, dword [eax]
lea eax, [edx + eax*2]
mov dword [ebp - 0x184], eax
cmp ecx, eax
je 0x459be2
nop dword [eax + eax]
movzx eax, word [ecx]
push eax
call fcn.0051e971
add esp, 4
movzx ecx, ax
mov dword [ebp - 0x180], ecx
cmp esi, edi
jae 0x459aa6
lea eax, [esi + 1]
cmp edi, 8
mov dword [ebp - 0x130], eax
lea eax, [ebp - 0x140]
cmovae eax, ebx
mov word [eax + esi*2], cx
xor ecx, ecx
mov word [eax + esi*2 + 2], cx
mov esi, dword [ebp - 0x130]
mov edi, dword [ebp - 0x12c]
mov ebx, dword [ebp - 0x140]
mov dword [ebp - 0x16c], esi
jmp 0x459bc7
mov ecx, esi
mov eax, SysReAllocString
sub eax, ecx
mov dword [ebp - 0x17c], ecx
cmp eax, 1
jb 0x459d37
lea esi, [ecx + 1]
mov edx, edi
mov edi, esi
mov dword [ebp - 0x16c], esi
or edi, 7
mov dword [ebp - 0x178], edx
cmp edi, 0x7ffffffe
jbe 0x459ae3
mov edi, SysReAllocString
jmp 0x459b01
mov ecx, edx
mov eax, SysReAllocString
shr ecx, 1
sub eax, ecx
cmp edx, eax
jbe 0x459af9
mov edi, SysReAllocString
jmp 0x459b01
lea eax, [edx + ecx]
cmp edi, eax
cmovb edi, eax
lea eax, [edi + 1]
push eax
lea ecx, [ebp - 0x140]
call fcn.00418930
mov dword [ebp - 0x130], esi
mov esi, dword [ebp - 0x17c]
add esi, esi
mov dword [ebp - 0x160], eax
cmp dword [ebp - 0x178], 8
mov dword [ebp - 0x12c], edi
push esi
jb 0x459b92
push ebx
push eax
call fcn.0050d1a0
mov eax, dword [ebp - 0x160]
add esp, 0xc
mov ecx, dword [ebp - 0x180]
mov word [esi + eax], cx
xor ecx, ecx
mov word [esi + eax + 2], cx
mov eax, dword [ebp - 0x178]
lea ecx, [eax*2 + 2]
mov eax, ebx
cmp ecx, 0x1000
jb 0x459b80
mov ebx, dword [ebx - 4]
add ecx, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x459d3c
push ecx
push ebx
call fcn.0046282d
mov ebx, dword [ebp - 0x160]
add esp, 8
jmp 0x459bbb
lea ecx, [ebp - 0x140]
push ecx
push eax
call fcn.0050d1a0
mov eax, dword [ebp - 0x160]
add esp, 0xc
mov ecx, dword [ebp - 0x180]
mov ebx, eax
mov word [esi + eax], cx
xor ecx, ecx
mov word [esi + eax + 2], cx
mov esi, dword [ebp - 0x16c]
mov dword [ebp - 0x140], ebx
mov ecx, dword [ebp - 0x164]
add ecx, 2
mov dword [ebp - 0x164], ecx
cmp ecx, dword [ebp - 0x184]
jne 0x459a50
mov esi, dword [ebp - 0x174]
lea eax, [ebp - 0x128]
mov ecx, dword [ebp - 0x168]
lea edx, [ebp - 0x140]
cmp esi, 8
cmovae eax, ecx
cmp edi, 8
mov dword [ebp - 0x160], eax
cmovae edx, ebx
mov dword [ebp - 0x164], edx
mov edx, dword [ebp - 0x16c]
cmp edx, dword [ebp - 0x170]
jne 0x459c6f
test edx, edx
je 0x459c5f
sub dword [ebp - 0x164], eax
nop word [eax + eax]
mov esi, dword [ebp - 0x164]
mov ax, word [eax + esi]
mov esi, dword [ebp - 0x160]
cmp ax, word [esi]
mov esi, dword [ebp - 0x174]
jne 0x459c6f
mov eax, dword [ebp - 0x160]
add eax, 2
mov dword [ebp - 0x160], eax
sub edx, 1
jne 0x459c30
cmp dword [ebp - 0x170], 0
je 0x459c6f
mov byte [ebp - 0x159], 1
cmp edi, 8
jb 0x459ca9
lea edi, [edi*2 + 2]
mov eax, ebx
cmp edi, 0x1000
jb 0x459c99
mov ebx, dword [ebx - 4]
add edi, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x459d3c
push edi
push ebx
call fcn.0046282d
mov ecx, dword [ebp - 0x168]
add esp, 8
cmp esi, 8
jb 0x459cd9
lea esi, [esi*2 + 2]
mov eax, ecx
cmp esi, 0x1000
jb 0x459ccf
mov ecx, dword [ecx - 4]
add esi, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x459d41
push esi
push ecx
call fcn.0046282d
add esp, 8
mov esi, dword [ebp - 0x144]
cmp esi, 8
jb 0x459d15
mov edx, dword [ebp - 0x158]
lea esi, [esi*2 + 2]
mov eax, edx
cmp esi, 0x1000
jb 0x459d0b
mov edx, dword [edx - 4]
add esi, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x459d46
push esi
push edx
call fcn.0046282d
add esp, 8
mov al, byte [ebp - 0x159]
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.004626cb
mov esp, ebp
pop ebp
ret
call fcn.004188a0
call fcn.00510d59
call fcn.00510d59
call fcn.00510d59
int3