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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58ecf8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x328b0
call fcn.0054e3f0
push ebx
push esi
mov esi, ecx
push edi
xor ebx, ebx
mov dword [ebp - 0x10], esp
mov al, byte [esi + 0x70f]
mov dword [ebp - 0x40], esi
test al, al
mov dword [ebp - 0x14], ebx
je 0x51f180
mov eax, dword [0x639ad4]
mov dword [ebp - 0x24], eax
lea ecx, [ebp - 0x24]
push ebx
push ecx
lea ecx, [esi + 0x20]
mov dword [ebp - 4], ebx
call fcn.005080e0
mov eax, dword [ebp - 0x24]
lea edx, [ebp - 0x14]
push edx
push eax
call fcn.0051f930
add esp, 8
test eax, eax
jne 0x51f16c
mov dword [ebp - 0x14], ebx
lea ecx, [ebp - 0x24]
mov dword [ebp - 4], 0xffffffff
call fcn.0056a100
mov eax, dword [ebp - 0x14]
jmp 0x51f189
mov eax, dword [esi + 0x718]
mov dword [ebp - 0x14], eax
cmp eax, ebx
je 0x51f205
test byte [eax + 0xc], 1
je 0x51f205
mov ecx, dword [eax + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x51f205
mov eax, dword [ebp - 0x14]
lea edx, [ebp - 0x38]
add eax, 0x20
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
test eax, eax
je 0x51f205
lea ecx, [ebp - 0x38]
push 0xffffffffffffffff
push ecx
lea ecx, [ebp - 0x24]
call fcn.00563432
lea edx, [ebp - 0x3c]
push str._a___d__b__Y__H:_M:_S_GMT
push edx
lea ecx, [ebp - 0x24]
call fcn.00563563
mov ecx, dword [esi + 0x390]
mov eax, dword [eax]
push ecx
push eax
lea ecx, [esi + 0x20]
mov dword [ebp - 4], 1
call fcn.0052ca10
lea ecx, [ebp - 0x3c]
mov dword [ebp - 4], 0xffffffff
call fcn.0056a100
mov byte [esi + 0x2d0], 1
mov eax, dword [esi + 0x5d4]
lea edi, [esi + 0x5d4]
cmp eax, ebx
je 0x51f3be
push 0x51ebe0
push 0x51ebc0
push 0x10
lea edx, [ebp - 0x328c0]
push 0x3288
push edx
call fcn.0054ebc3
mov ebx, 2
push 0x7c0
mov dword [ebp - 4], ebx
call fcn.0056649c
add esp, 4
mov dword [ebp - 0x28], eax
test eax, eax
mov byte [ebp - 4], 3
je 0x51f277
mov ecx, dword [esi]
lea edx, [esi + 0x3b4]
push ecx
push edx
lea ecx, [esi + 0x20]
lea edx, [ebp - 0x328c0]
push ecx
push edx
push edi
mov ecx, eax
call fcn.005035c0
mov edi, eax
jmp 0x51f279
xor edi, edi
lea eax, [esi + 0x14]
mov dword [esi + 0x5c8], 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 + 0xf8], edx
mov eax, dword [esi + 0x704]
test eax, eax
je 0x51f2da
mov eax, dword [esi + 0x708]
test eax, eax
je 0x51f2da
mov eax, dword [esi + 0x39c]
mov ecx, dword [esi + 0x398]
test eax, eax
jl 0x51f2da
jg 0x51f2cd
test ecx, ecx
jbe 0x51f2da
push eax
push ecx
mov ecx, dword [esi + 0x5c8]
call fcn.0051cc60
mov eax, dword [esi + 0x6f8]
mov ecx, dword [esi + 0x6fc]
mov edx, dword [esi + 0x708]
push eax
mov eax, dword [esi + 0x704]
push ecx
push edx
mov dl, byte [esi + 0x6f4]
xor ecx, ecx
push eax
test dl, dl
mov edx, dword [esi + 0x390]
sete cl
push ecx
push edx
mov ecx, edi
call fcn.0051c980
xor ebx, ebx
mov dword [esi + 0x6f0], eax
cmp eax, ebx
jne 0x51f380
mov eax, dword [esi + 8]
mov edx, dword [edi]
mov ecx, edi
mov dword [edi + 0xd4], eax
call dword [edx + 8]
mov ecx, esi
mov dword [esi + 0x6f0], eax
call fcn.00524680
mov ecx, dword [esi + 0x5c8]
mov eax, dword [ecx + 0x120]
mov edx, dword [ecx + 0x124]
mov dword [esi + 0x3a0], eax
mov dword [esi + 0x3a4], edx
mov edx, dword [ecx + 0x118]
mov ebx, dword [ecx + 0x11c]
mov eax, edx
or eax, ebx
je 0x51f379
mov eax, ebx
mov dword [esi + 0x398], edx
mov dword [esi + 0x39c], eax
call fcn.0051cbf0
xor ebx, ebx
cmp edi, ebx
mov dword [esi + 0x5c8], ebx
je 0x51f39a
mov ecx, edi
call fcn.00503670
push edi
call fcn.005664c5
add esp, 4
push 0x51ebe0
push 0x10
lea eax, [ebp - 0x328c0]
push 0x3288
push eax
mov dword [ebp - 4], 0xffffffff
call fcn.0054db32
jmp 0x51f5e5
push 0x4f8290
push fcn.004f8050
push 0x10
lea ecx, [ebp - 0x328c0]
push 0x3288
push ecx
call fcn.0054ebc3
mov ebx, 4
push 0x7c0
mov dword [ebp - 4], ebx
call fcn.0056649c
add esp, 4
mov dword [ebp - 0x28], eax
test eax, eax
mov byte [ebp - 4], 5
je 0x51f41c
mov edx, dword [esi]
lea ecx, [esi + 0x3b4]
push edx
push ecx
lea edx, [esi + 0x20]
lea ecx, [ebp - 0x328c0]
push edx
push ecx
push edi
mov ecx, eax
call fcn.005035c0
mov edi, eax
jmp 0x51f41e
xor edi, edi
lea eax, [esi + 0x14]
mov dword [esi + 0x5c8], 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 + 0xf8], ecx
mov eax, dword [esi + 0x704]
test eax, eax
je 0x51f47f
mov eax, dword [esi + 0x708]
test eax, eax
je 0x51f47f
mov eax, dword [esi + 0x39c]
mov ecx, dword [esi + 0x398]
test eax, eax
jl 0x51f47f
jg 0x51f472
test ecx, ecx
jbe 0x51f47f
push eax
push ecx
mov ecx, dword [esi + 0x5c8]
call fcn.0051cc60
mov edx, dword [esi + 0x6f8]
mov eax, dword [esi + 0x6fc]
mov ecx, dword [esi + 0x708]
push edx
mov edx, dword [esi + 0x704]
push eax
push ecx
mov cl, byte [esi + 0x6f4]
xor eax, eax
push edx
test cl, cl
mov ecx, dword [esi + 0x390]
sete al
push eax
push ecx
mov ecx, edi
call fcn.0051c980
test eax, eax
mov dword [esi + 0x6f0], eax
jne 0x51f5a6
mov edx, dword [esi + 8]
mov eax, dword [edi]
mov ecx, edi
mov dword [edi + 0xd4], edx
call dword [eax + 8]
cmp eax, 0x7563
mov dword [esi + 0x6f0], eax
jne 0x51f552
xor ebx, ebx
cmp edi, ebx
mov dword [esi + 0x5c8], ebx
je 0x51f4fe
mov ecx, edi
call fcn.00503670
push edi
call fcn.005664c5
add esp, 4
mov eax, dword [ebp - 0x14]
mov dword [esi + 0x6f0], ebx
cmp eax, ebx
je 0x51f517
push eax
call fcn.005664c5
add esp, 4
mov dword [ebp - 0x14], ebx
mov ecx, esi
call fcn.0051e650
push 0x4f8290
push 0x10
lea ecx, [ebp - 0x328c0]
push 0x3288
push ecx
mov esi, eax
mov dword [ebp - 4], 0xffffffff
call fcn.0054db32
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.00524680
mov ecx, dword [esi + 0x5c8]
mov eax, dword [ecx + 0x120]
mov edx, dword [ecx + 0x124]
mov dword [esi + 0x3a0], eax
mov dword [esi + 0x3a4], edx
mov edx, dword [ecx + 0x118]
mov ebx, dword [ecx + 0x11c]
mov eax, edx
or eax, ebx
je 0x51f597
mov eax, ebx
mov dword [esi + 0x398], edx
mov dword [esi + 0x39c], eax
mov eax, dword [esi + 0x390]
test eax, eax
je 0x51f5a6
call fcn.0051cbf0
test edi, edi
mov dword [esi + 0x5c8], 0
je 0x51f5c4
mov ecx, edi
call fcn.00503670
push edi
call fcn.005664c5
add esp, 4
push 0x4f8290
push 0x10
lea edx, [ebp - 0x328c0]
push 0x3288
push edx
mov dword [ebp - 4], 0xffffffff
call fcn.0054db32
xor ebx, ebx
cmp dword [esi + 0x700], ebx
jne 0x51f7cd
cmp dword [esi + 0x6f0], ebx
jne 0x51f7cd
mov al, byte [esi + 0x2c8]
test al, al
je 0x51f7cd
mov al, byte [esi + 0x2c9]
test al, al
jne 0x51f7cd
xor eax, eax
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x20], eax
mov word [ebp - 0x1c], bx
mov ecx, dword [esi + 0xcc]
mov dword [ebp - 4], 6
cmp ecx, ebx
je 0x51f701
mov edi, dword [esi + 0x54]
cmp edi, ebx
jne 0x51f648
lea edi, [esi + 0x58]
cmp edi, ebx
je 0x51f6ae
cmp eax, ebx
je 0x51f6ae
push edi
call fcn.0054e46e
add esp, 4
test eax, eax
je 0x51f6ae
mov eax, dword [ebp - 0x20]
cmp eax, edi
ja 0x51f6ae
push eax
call fcn.0054e46e
mov ecx, dword [ebp - 0x20]
add esp, 4
lea edx, [ecx + eax*2]
cmp edx, edi
jb 0x51f6ae
push edi
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x2c], ebx
mov word [ebp - 0x30], bx
call fcn.00402b60
mov eax, dword [ebp - 0x34]
mov byte [ebp - 4], 7
cmp eax, ebx
jne 0x51f694
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x20]
call fcn.00402b60
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 6
call fcn.00401070
jmp 0x51f759
lea ecx, [ebp - 0x20]
call fcn.00401070
cmp edi, ebx
je 0x51f759
push edi
call fcn.0054e46e
add esp, 4
test eax, eax
je 0x51f759
push edi
call fcn.0054e46e
lea eax, [eax + eax + 2]
push eax
call fcn.0056649c
add esp, 8
cmp eax, ebx
mov dword [ebp - 0x20], eax
je 0x51f760
push edi
call fcn.0054e46e
mov ecx, dword [ebp - 0x20]
push edi
push ecx
mov dword [ebp - 0x18], eax
call fcn.0054e449
add esp, 0xc
jmp 0x51f759
mov ebx, dword [esi + 0x50]
lea ecx, [ebp - 0x20]
call fcn.00401070
test ebx, ebx
je 0x51f759
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x51f759
mov edi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push eax
push eax
push 0xffffffffffffffff
push ebx
push eax
push eax
call edi
test eax, eax
mov dword [ebp - 0x18], eax
je 0x51f759
lea edx, [eax + eax + 2]
push edx
call fcn.0056649c
add esp, 4
mov dword [ebp - 0x20], eax
test eax, eax
je 0x51f760
mov ecx, dword [ebp - 0x18]
push ecx
push eax
push 0xffffffffffffffff
push ebx
push 0
push 0
call edi
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x51f763
lea eax, [ebp - 0x1c]
push eax
mov ecx, esi
call fcn.0051f9f0
test al, al
jne 0x51f7be
mov byte [esi + 0x2c8], al
mov eax, dword [ebp - 0x14]
test eax, eax
mov byte [esi + 0x2c9], 1
je 0x51f793
push eax
call fcn.005664c5
add esp, 4
mov dword [ebp - 0x14], 0
mov ecx, esi
call fcn.0051f100
lea ecx, [ebp - 0x20]
mov esi, eax
mov dword [ebp - 4], 0xffffffff
call fcn.00401070
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
lea ecx, [ebp - 0x20]
mov dword [ebp - 4], 0xffffffff
call fcn.00401070
mov ebx, dword [ebp - 0x14]
test ebx, ebx
je 0x51f903
cmp dword [esi + 0x6f0], 0x7573
jne 0x51f8d2
mov eax, dword [esi + 0x39c]
test eax, eax
jg 0x51f89b
jl 0x51f806
mov eax, dword [esi + 0x398]
test eax, eax
ja 0x51f89b
mov edx, dword [ebx + 8]
push 0
push 0
push 3
push 0
push 1
push connect
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x51f898
lea eax, [ebp - 0x28]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
xor ebx, ebx
mov dword [esi + 0x398], eax
mov dword [esi + 0x39c], ebx
mov eax, dword [esi + 0x398]
cmp eax, 0xffffffff
jne 0x51f868
mov eax, ebx
cmp eax, ebx
jne 0x51f868
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
je 0x51f868
mov dword [esi + 0x398], ebx
mov dword [esi + 0x39c], ebx
jmp 0x51f891
mov ecx, dword [ebp - 0x28]
push 1
push ebx
push ebx
push ecx
call fcn.00550840
mov ecx, dword [esi + 0x398]
add ecx, eax
mov dword [esi + 0x398], ecx
mov eax, dword [esi + 0x39c]
adc eax, edx
mov dword [esi + 0x39c], eax
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 0x14]
mov edx, dword [ebx + 0x48]
test edx, edx
je 0x51f8c8
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x51f8c8
push edx
lea edx, [esi + 0x2d4]
push 0x615e9c
push edx
call fcn.00562ecb
mov ebx, dword [ebp - 0x14]
add esp, 0xc
mov dword [esi + 0x6f0], 0
cmp ebx, dword [esi + 0x718]
je 0x51f903
push ebx
mov dword [ebp - 4], 8
call fcn.005664c5
add esp, 4
jmp 0x51f8f5
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x14], 0
mov ecx, esi
call fcn.00521660
mov eax, dword [esi + 0x6f0]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret