Function at 0x484f90
Capabilities:
Check if file exists

Disassembly:
sub esp, 0x838
push ebx
push ebp
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
xor ebp, ebp
mov dword [0x598a40], ebp
call edi
mov esi, dword [esp + 0x84c]
mov dword [0x598a48], eax
cmp esi, ebp
je 0x485866
cmp word [esi], bp
je 0x485866
cmp dword [esp + 0x850], ebp
je 0x485866
mov eax, dword [esp + 0x854]
cmp eax, ebp
je 0x485866
mov eax, dword [eax]
cmp eax, ebp
je 0x485866
cmp dword [0x598a4c], ebp
jne 0x48501d
mov dword [0x598a40], 2
mov dword [0x598a44], 0x1928
call edi
pop edi
pop esi
mov dword [0x598a48], eax
pop ebp
xor eax, eax
pop ebx
add esp, 0x838
ret
push ebp
push 0x60
push 1
push 7
push 0x80
push 0x120089
push esi
mov dword [esp + 0x48], ebp
mov dword [esp + 0x34], ebp
mov dword [esp + 0x44], eax
call fcn.004bff10
mov ebx, eax
add esp, 0x1c
cmp ebx, 0xffffffff
mov dword [esp + 0x14], ebx
jne 0x485081
call edi
cmp eax, 2
je 0x48577d
push ebp
push 0x60
push 1
push 7
push 0x80
push 0x120089
push esi
call fcn.004bff10
add esp, 0x1c
cmp eax, ebx
mov dword [esp + 0x14], eax
je 0x48578d
mov ebx, eax
push ebp
push ebp
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
call ebp
mov ecx, 0xf7
xor eax, eax
lea edi, [esp + 0x469]
mov byte [esp + 0x468], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
cmp ebx, 0xffffffff
stosb byte es:[edi], al
je 0x485146
lea eax, [esp + 0x468]
test eax, eax
je 0x485146
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x485122
mov ecx, 0xf8
xor eax, eax
lea edi, [esp + 0x468]
xor esi, esi
rep stosd dword es:[edi], eax
push esi
lea ecx, [esp + 0x28]
push esi
push ecx
lea edx, [esp + 0x474]
push 0x3e0
push edx
push ebx
mov dword [esp + 0x3c], esi
call fcn.004bf5a0
add esp, 0x18
test eax, eax
jne 0x48515c
mov dword [0x598a40], 0xd
mov dword [0x598a44], 0x1490
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x598a48], eax
mov dword [0x598a40], 0xf
mov dword [0x598a44], 0x1955
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x598a48], eax
jmp 0x485543
mov dword [0x598a40], 1
mov dword [0x598a44], 0x1483
jmp 0x485117
lea eax, [esp + 0x468]
push eax
call fcn.0048cdf0
mov edx, eax
add esp, 4
cmp edx, esi
je 0x4857ad
mov ecx, 0xe1
xor eax, eax
lea edi, [esp + 0xe1]
mov byte [esp + 0xe0], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
cmp edx, 3
stosb byte es:[edi], al
jne 0x48556b
lea ecx, [esp + 0xe0]
lea edx, [esp + 0x468]
push ecx
push edx
call fcn.0048c490
add esp, 8
test eax, eax
je 0x4857d1
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x598a40], esi
call ebp
mov dword [0x598a48], eax
lea eax, [esp + 0xe0]
test eax, eax
jne 0x485213
mov dword [0x598a40], 1
mov dword [0x598a44], 0x3745
call ebp
mov dword [0x598a48], eax
mov dword [0x598a40], 0x1f
mov dword [0x598a44], 0x196d
call ebp
mov dword [0x598a48], eax
jmp 0x485543
cmp dword [0x598a4c], esi
jne 0x485231
mov dword [0x598a40], 2
mov dword [0x598a44], 0x374b
jmp 0x4851ec
cmp dword [0x598ffc], esi
jne 0x485288
mov eax, dword [esp + 0x2cc]
mov edx, dword [esp + 0x2d4]
mov ecx, dword [0x598a5c]
cmp eax, 0x2710
ja 0x485266
cmp ecx, 0x2710
ja 0x485288
cmp ecx, eax
je 0x485288
cmp eax, esi
jne 0x485276
jmp 0x485288
cmp eax, ecx
jne 0x485276
cmp dword [0x598a64], esi
ja 0x485288
cmp edx, esi
je 0x485288
push edx
push eax
call fcn.00492b60
add esp, 8
cmp eax, esi
je 0x4851f3
mov ecx, dword [esp + 0x104]
push ecx
call fcn.004c2d10
mov esi, eax
xor edx, edx
add esp, 4
cmp esi, edx
mov dword [esp + 0x4c], esi
je 0x4857f5
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0xa1]
mov byte [esp + 0xa0], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dword [esp + 0x3c], edx
mov dword [esp + 0x48], edx
lea edx, [esp + 0x3c]
lea ecx, [esp + 0x48]
stosb byte es:[edi], al
push edx
lea eax, [esp + 0xa4]
push 0x40
push eax
lea edx, [esp + 0xec]
push ecx
push edx
call fcn.00493550
add esp, 0x14
test eax, eax
je 0x485815
mov eax, dword [esp + 0x11c]
test eax, eax
je 0x485835
mov edi, dword [esp + 0x120]
cmp eax, 1
mov dword [esp + 0x1c], edi
jne 0x485322
mov eax, dword [esp + 0x124]
mov dword [esp + 0x1c], eax
mov edi, eax
push edi
call fcn.0052644a
mov edx, dword [esi]
add esp, 4
mov ecx, esi
mov ebx, eax
push edi
call dword [edx + 0xc]
push eax
mov dword [esp + 0x3c], eax
call fcn.0052644a
mov ecx, dword [esp + 0x18]
add esp, 4
xor esi, esi
mov ebp, eax
mov eax, dword [esp + 0x118]
push esi
push esi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
xor eax, eax
mov dword [esp + 0x20], esi
mov dword [esp + 0x10], esi
jmp 0x48536f
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x11c]
mov esi, dword [esp + 0x120]
inc eax
cmp eax, ecx
mov dword [esp + 0x40], eax
jne 0x485395
mov esi, dword [esp + 0x124]
mov dword [esp + 0x20], 1
mov ecx, edi
xor eax, eax
mov edx, ecx
mov edi, ebx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x38]
xor eax, eax
mov edx, ecx
mov edi, ebp
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
lea edx, [esp + 0x58]
and ecx, 3
push edx
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x11c]
xor eax, eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x60], eax
push eax
lea eax, [esp + 0x4c]
mov dword [esp + 0x60], ecx
mov ecx, dword [esp + 0x1c]
push eax
push esi
push ebx
push ecx
call fcn.004bf5a0
add esp, 0x18
test eax, eax
je 0x4854a0
mov edx, dword [ebx]
add esi, 0xfffffffc
lea edi, [ebx + 4]
push edx
push esi
push edi
call fcn.004c0150
add esp, 0xc
test eax, eax
je 0x4854b6
mov ecx, dword [esp + 0x4c]
lea edx, [esp + 0x34]
push edx
mov edx, dword [esp + 0x3c]
mov eax, dword [ecx]
push edx
mov edx, dword [esp + 0x44]
push ebp
push esi
push edi
push edx
lea edx, [esp + 0xb8]
push edx
mov dword [esp + 0x50], 0
call dword [eax + 0x14]
test eax, eax
je 0x4854cc
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x28]
cmp edx, ecx
jbe 0x4854f5
mov edi, dword [esp + 0x850]
mov eax, ecx
mov esi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x34]
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x850]
add edi, eax
add esi, eax
sub edx, eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x18], edi
test eax, eax
mov dword [esp + 0x850], esi
mov dword [esp + 0x28], edx
je 0x485367
jmp 0x485520
mov dword [0x598a40], 0xd
mov dword [0x598a44], 0x19b3
jmp 0x4854e0
mov dword [0x598a40], 0x1c
mov dword [0x598a44], 0x19bc
jmp 0x4854e0
mov dword [0x598a40], 0x12
mov dword [0x598a44], 0x19c5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x598a48], eax
mov dword [esp + 0x10], 1
jmp 0x485520
mov edi, dword [esp + 0x850]
mov ecx, edx
mov eax, ecx
mov esi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x18]
and ecx, 3
add eax, edx
rep movsb byte es:[edi], byte [esi]
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], 0
push ebx
call fcn.00526473
push ebp
call fcn.00526473
mov eax, dword [esp + 0x18]
add esp, 8
test eax, eax
jne 0x48553f
mov dword [esp + 0x2c], 1
mov ebx, dword [esp + 0x14]
mov edx, dword [esp + 0x854]
mov ecx, dword [esp + 0x18]
cmp ebx, 0xffffffff
mov dword [edx], ecx
je 0x48555c
push ebx
call dword [0x59a140]
mov eax, dword [esp + 0x2c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x838
ret
cmp edx, 1
je 0x485575
cmp edx, 2
jne 0x485543
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x61]
mov byte [esp + 0x60], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
cmp edx, 1
stosb byte es:[edi], al
jne 0x485592
push edx
jmp 0x4855ba
mov edi, 0x57b398
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x60]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 2
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.004c2d10
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
je 0x485842
push 0
push 0
push 0x100
push ebx
call ebp
push 0x10000
call fcn.0052644a
push 0x10000
mov ebx, eax
call fcn.0052644a
add esp, 8
xor esi, esi
mov ebp, eax
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], esi
jmp 0x485603
xor esi, esi
mov ecx, 0x4000
xor eax, eax
mov edi, ebx
lea edx, [esp + 0x24]
rep stosd dword es:[edi], eax
mov ecx, 0x4000
mov edi, ebp
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x50]
push ecx
push esi
push edx
push 0x10000
push ebx
push eax
mov dword [esp + 0x3c], esi
mov dword [esp + 0x6c], esi
mov dword [esp + 0x68], 0x100
call fcn.004bf5a0
add esp, 0x18
test eax, eax
je 0x4856f7
mov eax, dword [esp + 0x24]
cmp eax, 0x10000
jae 0x485668
cmp eax, esi
mov dword [esp + 0x20], 1
je 0x485763
mov ecx, dword [esp + 0x10]
lea edi, [esp + 0x60]
mov dword [esp + 0x30], esi
mov edx, dword [ecx]
lea ecx, [esp + 0x30]
push ecx
push 0x10000
push ebp
push eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ebx
lea eax, [esp + 0x74]
push ecx
mov ecx, dword [esp + 0x28]
push eax
call dword [edx + 0x14]
test eax, eax
je 0x48570d
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x28]
cmp edx, ecx
jbe 0x485736
mov edi, dword [esp + 0x850]
mov eax, ecx
mov esi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x30]
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x850]
add edi, eax
add esi, eax
sub edx, eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x18], edi
test eax, eax
mov dword [esp + 0x850], esi
mov dword [esp + 0x28], edx
je 0x485601
jmp 0x485761
mov dword [0x598a40], 0xd
mov dword [0x598a44], 0x1a11
jmp 0x485721
mov dword [0x598a40], 0x12
mov dword [0x598a44], 0x1a21
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x598a48], eax
mov dword [esp + 0x1c], 1
jmp 0x485763
mov edi, dword [esp + 0x850]
mov ecx, edx
mov eax, ecx
mov esi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x18]
and ecx, 3
add eax, edx
rep movsb byte es:[edi], byte [esi]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], 0
xor esi, esi
push ebx
call fcn.00526473
push ebp
call fcn.00526473
mov eax, dword [esp + 0x24]
add esp, 8
cmp eax, esi
jmp 0x485535
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x838
ret
mov dword [0x598a40], 3
mov dword [0x598a44], 0x194a
call edi
mov dword [0x598a48], eax
jmp 0x48553f
mov dword [0x598a40], 0x22
mov dword [0x598a44], 0x195c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x598a48], eax
jmp 0x485543
mov dword [0x598a40], 0x14
mov dword [0x598a44], 0x1966
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x598a48], eax
jmp 0x485543
mov dword [0x598a40], 0xc
mov dword [0x598a44], 0x1977
call ebp
mov dword [0x598a48], eax
jmp 0x485543
mov dword [0x598a40], 0xb
mov dword [0x598a44], 0x1980
call ebp
mov dword [0x598a48], eax
jmp 0x485543
mov dword [esp + 0x2c], 1
jmp 0x485543
mov dword [0x598a40], 0xc
mov dword [0x598a44], 0x19f7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x598a48], eax
jmp 0x485543
mov dword [0x598a40], 1
mov dword [0x598a44], 0x1922
call edi
pop edi
pop esi
mov dword [0x598a48], eax
pop ebp
xor eax, eax
pop ebx
add esp, 0x838
ret