Function at 0x5007c0
Capabilities:
Check if file exists
Get file attributes
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5654d8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x30724
call fcn.00527220
push ebx
push esi
mov esi, ecx
push edi
xor ebx, ebx
mov dword [ebp - 0x10], esp
mov al, byte [esi + 0x79f]
mov dword [ebp - 0x20], esi
test al, al
mov dword [ebp - 0x14], ebx
je 0x500840
mov eax, dword [0x5c2a74]
mov dword [ebp - 0x18], eax
lea ecx, [ebp - 0x18]
push ebx
push ecx
lea ecx, [esi + 0x20]
mov dword [ebp - 4], ebx
call fcn.004ea0e0
mov eax, dword [ebp - 0x18]
lea edx, [ebp - 0x14]
push edx
push eax
call fcn.00500e70
add esp, 8
test eax, eax
jne 0x50082c
mov dword [ebp - 0x14], ebx
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0xffffffff
call fcn.005421be
mov eax, dword [ebp - 0x14]
jmp 0x500849
mov eax, dword [esi + 0x7ac]
mov dword [ebp - 0x14], eax
cmp eax, ebx
je 0x5008c5
test byte [eax + 0xc], 1
je 0x5008c5
mov ecx, dword [eax + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x5008c5
mov eax, dword [ebp - 0x14]
lea edx, [ebp - 0x34]
add eax, 0x20
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
test eax, eax
je 0x5008c5
lea ecx, [ebp - 0x34]
push 0xffffffffffffffff
push ecx
lea ecx, [ebp - 0x18]
call fcn.0053b541
lea edx, [ebp - 0x24]
push str._a___d__b__Y__H:_M:_S_GMT
push edx
lea ecx, [ebp - 0x18]
call fcn.0053b672
mov ecx, dword [esi + 0x420]
mov eax, dword [eax]
push ecx
push eax
lea ecx, [esi + 0x20]
mov dword [ebp - 4], 1
call fcn.00509080
lea ecx, [ebp - 0x24]
mov dword [ebp - 4], 0xffffffff
call fcn.005421be
mov byte [esi + 0x367], 1
mov eax, dword [esi + 0x664]
lea edi, [esi + 0x664]
cmp eax, ebx
je 0x500a80
push 0x5002a0
push 0x500280
push 0x10
lea edx, [ebp - 0x30734]
push 0x3070
push edx
call fcn.0052798f
mov ebx, 2
push 0x8b8
mov dword [ebp - 4], ebx
call fcn.0054276d
add esp, 4
mov dword [ebp - 0x1c], eax
test eax, eax
mov byte [ebp - 4], 3
je 0x500937
mov ecx, dword [esi]
lea edx, [esi + 0x444]
push ecx
push edx
lea ecx, [esi + 0x20]
lea edx, [ebp - 0x30734]
push ecx
push edx
push edi
mov ecx, eax
call fcn.004e79f0
mov edi, eax
jmp 0x500939
xor edi, edi
lea eax, [esi + 0x14]
mov dword [esi + 0x658], edi
mov dword [edi + 0x10], eax
mov dword [edi + 0x98], eax
lea eax, [esi + 0x18]
lea ecx, [esi + 0x1c]
mov dword [edi + 0x14], eax
mov dword [edi + 0x18], ecx
mov edx, dword [ebp - 0x14]
mov byte [ebp - 4], bl
mov dword [edi + 0x1f4], edx
mov eax, dword [esi + 0x794]
test eax, eax
je 0x50099a
mov eax, dword [esi + 0x798]
test eax, eax
je 0x50099a
mov eax, dword [esi + 0x42c]
mov ecx, dword [esi + 0x428]
test eax, eax
jl 0x50099a
jg 0x50098d
test ecx, ecx
jbe 0x50099a
push eax
push ecx
mov ecx, dword [esi + 0x658]
call fcn.004fe510
mov eax, dword [esi + 0x788]
mov ecx, dword [esi + 0x78c]
mov edx, dword [esi + 0x798]
push eax
mov eax, dword [esi + 0x794]
push ecx
push edx
mov dl, byte [esi + 0x784]
xor ecx, ecx
push eax
test dl, dl
mov edx, dword [esi + 0x420]
sete cl
push ecx
push edx
mov ecx, edi
call fcn.004fe230
test eax, eax
mov dword [esi + 0x780], eax
jne 0x500a3c
mov eax, dword [esi + 8]
mov edx, dword [edi]
mov ecx, edi
mov dword [edi + 0x1d0], eax
call dword [edx + 8]
mov ecx, esi
mov dword [esi + 0x780], eax
call fcn.00504e90
mov ecx, dword [esi + 0x658]
mov eax, dword [ecx + 0x218]
mov edx, dword [ecx + 0x21c]
mov dword [esi + 0x430], eax
mov dword [esi + 0x434], edx
mov edx, dword [ecx + 0x210]
mov ebx, dword [ecx + 0x214]
mov eax, edx
or eax, ebx
je 0x500a37
mov eax, ebx
mov dword [esi + 0x428], edx
mov dword [esi + 0x42c], eax
call fcn.004fe4a0
test edi, edi
mov dword [esi + 0x658], 0
je 0x500a5a
mov ecx, edi
call fcn.004e7aa0
push edi
call fcn.00542796
add esp, 4
push 0x5002a0
push 0x10
lea eax, [ebp - 0x30734]
push 0x3070
push eax
mov dword [ebp - 4], 0xffffffff
call fcn.005278b1
xor ebx, ebx
jmp 0x500ca3
push 0x4ddad0
push fcn.004dd8c0
push 0x10
lea ecx, [ebp - 0x30734]
push 0x3070
push ecx
call fcn.0052798f
mov ebx, 4
push 0x8b8
mov dword [ebp - 4], ebx
call fcn.0054276d
add esp, 4
mov dword [ebp - 0x1c], eax
test eax, eax
mov byte [ebp - 4], 5
je 0x500ade
mov edx, dword [esi]
lea ecx, [esi + 0x444]
push edx
push ecx
lea edx, [esi + 0x20]
lea ecx, [ebp - 0x30734]
push edx
push ecx
push edi
mov ecx, eax
call fcn.004e79f0
mov edi, eax
jmp 0x500ae0
xor edi, edi
lea eax, [esi + 0x14]
mov dword [esi + 0x658], edi
mov dword [edi + 0x10], eax
mov dword [edi + 0x98], eax
lea edx, [esi + 0x18]
lea eax, [esi + 0x1c]
mov dword [edi + 0x14], edx
mov dword [edi + 0x18], eax
mov ecx, dword [ebp - 0x14]
mov byte [ebp - 4], bl
mov dword [edi + 0x1f4], ecx
mov eax, dword [esi + 0x794]
test eax, eax
je 0x500b41
mov eax, dword [esi + 0x798]
test eax, eax
je 0x500b41
mov eax, dword [esi + 0x42c]
mov ecx, dword [esi + 0x428]
test eax, eax
jl 0x500b41
jg 0x500b34
test ecx, ecx
jbe 0x500b41
push eax
push ecx
mov ecx, dword [esi + 0x658]
call fcn.004fe510
mov edx, dword [esi + 0x788]
mov eax, dword [esi + 0x78c]
mov ecx, dword [esi + 0x798]
push edx
mov edx, dword [esi + 0x794]
push eax
push ecx
mov cl, byte [esi + 0x784]
xor eax, eax
push edx
test cl, cl
mov ecx, dword [esi + 0x420]
sete al
push eax
push ecx
mov ecx, edi
call fcn.004fe230
xor ebx, ebx
mov dword [esi + 0x780], eax
cmp eax, ebx
jne 0x500c6a
mov edx, dword [esi + 8]
mov eax, dword [edi]
mov ecx, edi
mov dword [edi + 0x1d0], edx
call dword [eax + 8]
cmp eax, 0x7563
mov dword [esi + 0x780], eax
jne 0x500c14
cmp edi, ebx
mov dword [esi + 0x658], ebx
je 0x500bc0
mov ecx, edi
call fcn.004e7aa0
push edi
call fcn.00542796
add esp, 4
mov eax, dword [ebp - 0x14]
mov dword [esi + 0x780], ebx
cmp eax, ebx
je 0x500bd9
push eax
call fcn.00542796
add esp, 4
mov dword [ebp - 0x14], ebx
mov ecx, esi
call fcn.004ffd10
push 0x4ddad0
push 0x10
lea ecx, [ebp - 0x30734]
push 0x3070
push ecx
mov esi, eax
mov dword [ebp - 4], 0xffffffff
call fcn.005278b1
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, esi
call fcn.00504e90
mov ecx, dword [esi + 0x658]
mov eax, dword [ecx + 0x218]
mov edx, dword [ecx + 0x21c]
mov dword [esi + 0x430], eax
mov dword [esi + 0x434], edx
mov edx, dword [ecx + 0x210]
mov ebx, dword [ecx + 0x214]
mov eax, edx
or eax, ebx
je 0x500c59
mov eax, ebx
mov dword [esi + 0x428], edx
mov dword [esi + 0x42c], eax
mov eax, dword [esi + 0x420]
test eax, eax
je 0x500c68
call fcn.004fe4a0
xor ebx, ebx
cmp edi, ebx
mov dword [esi + 0x658], ebx
je 0x500c84
mov ecx, edi
call fcn.004e7aa0
push edi
call fcn.00542796
add esp, 4
push 0x4ddad0
push 0x10
lea edx, [ebp - 0x30734]
push 0x3070
push edx
mov dword [ebp - 4], 0xffffffff
call fcn.005278b1
cmp dword [esi + 0x790], ebx
jne 0x500d1b
cmp dword [esi + 0x780], ebx
jne 0x500d1b
mov al, byte [esi + 0x35f]
test al, al
je 0x500d1b
mov al, byte [esi + 0x360]
test al, al
jne 0x500d1b
cmp dword [esi + 0x1c0], ebx
je 0x500cd4
mov eax, dword [esi + 0x54]
jmp 0x500cd7
mov eax, dword [esi + 0x50]
push eax
mov ecx, esi
call fcn.00500f30
test al, al
jne 0x500d1b
mov byte [esi + 0x35f], al
mov eax, dword [ebp - 0x14]
cmp eax, ebx
mov byte [esi + 0x360], 1
je 0x500d03
push eax
call fcn.00542796
add esp, 4
mov dword [ebp - 0x14], ebx
mov ecx, esi
call fcn.005007c0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0x14]
test ebx, ebx
je 0x500e51
cmp dword [esi + 0x780], 0x7573
jne 0x500e20
mov eax, dword [esi + 0x42c]
test eax, eax
jg 0x500de9
jl 0x500d54
mov eax, dword [esi + 0x428]
test eax, eax
ja 0x500de9
mov eax, dword [ebx + 8]
push 0
push 0
push 3
push 0
push 1
push connect
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x500de6
lea ecx, [ebp - 0x1c]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
xor ebx, ebx
mov dword [esi + 0x428], eax
mov dword [esi + 0x42c], ebx
mov eax, dword [esi + 0x428]
cmp eax, 0xffffffff
jne 0x500db6
mov eax, ebx
cmp eax, ebx
jne 0x500db6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
je 0x500db6
mov dword [esi + 0x428], ebx
mov dword [esi + 0x42c], ebx
jmp 0x500ddf
mov edx, dword [ebp - 0x1c]
push 1
push ebx
push ebx
push edx
call fcn.005291e0
mov ecx, dword [esi + 0x428]
add ecx, eax
mov dword [esi + 0x428], ecx
mov eax, dword [esi + 0x42c]
adc eax, edx
mov dword [esi + 0x42c], eax
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 0x14]
mov edx, dword [ebx + 0x48]
test edx, edx
je 0x500e16
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x500e16
push edx
lea eax, [esi + 0x368]
push 0x5a3e24
push eax
call fcn.0053afda
mov ebx, dword [ebp - 0x14]
add esp, 0xc
mov dword [esi + 0x780], 0
cmp ebx, dword [esi + 0x7ac]
je 0x500e51
push ebx
mov dword [ebp - 4], 6
call fcn.00542796
add esp, 4
jmp 0x500e43
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x14], 0
mov ecx, esi
call fcn.00502230
mov eax, dword [esi + 0x780]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret