Function at 0x511d10
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6238b5
mov eax, dword fs:[0]
push eax
sub esp, 0x18c
mov eax, dword [0x659af8]
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 eax, ecx
mov dword [ebp - 0x7c], eax
mov edi, dword [ebp + 0xc]
xorps xmm0, xmm0
mov ecx, dword [ebp + 0x1c]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x78], eax
xor al, al
movups xmmword [ebp - 0x70], xmm0
mov dword [ebp - 0x80], edi
movups xmmword [ebp - 0x60], xmm0
mov dword [ebp - 0x84], ecx
mov byte [ebp - 0x72], 0
mov byte [ebp - 0x73], al
mov byte [ebp - 0x74], al
mov dword [ebp - 0x70], 0xffffffff
mov dword [ebp - 0x6c], getpeername
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 0xf
mov byte [ebp - 0x68], al
mov eax, dword [ebp + 8]
mov dword [ebp - 4], 0
cmp eax, 1
je 0x511f70
mov esi, dword [ebp + 0x10]
cmp esi, 0xc
jb 0x5121db
test eax, eax
jne 0x511dce
push dword [ebp - 0x18]
lea eax, [ebp - 0x70]
push ecx
push esi
push edi
push eax
call fcn.00511850
add esp, 0x14
jmp 0x511ec8
cmp eax, 2
jne 0x511fd0
xor al, al
movlpd qword [ebp - 0x2c], xmm0
mov byte [ebp - 0x71], al
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
nop
test al, al
jne 0x511ebe
push dword [ebp - 0x18]
lea eax, [ebp - 0x70]
mov byte [ebp - 4], 2
push ecx
push esi
push edi
push eax
call fcn.00511850
add esp, 0x14
mov byte [ebp - 0x72], 1
mov byte [ebp - 0x71], 1
jmp 0x511ea1
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 0
call fcn.00516d50
mov al, byte [ebp - 0x71]
mov ecx, dword [ebp - 0x84]
jmp 0x511df0
cmp byte [ebp - 0x72], 0
je 0x511fd0
push 0
push esi
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], 6
call fcn.005168f0
push 0xffffffffffffffff
push dword [ebp - 0x78]
lea eax, [ebp - 0x70]
mov dword [ebp - 0x20], 0
push 0
push 0
push 0
push 0xc0000000
xorps xmm0, xmm0
lea ecx, [ebp - 0x30]
push eax
movups xmmword [ebp - 0x30], xmm0
call fcn.00511210
mov esi, dword [ebp - 0x30]
mov ecx, 1
mov byte [ebp - 4], 7
xor eax, eax
lock cmpxchg dword [esi], ecx
test eax, eax
jne 0x511f53
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp + 0x20]
add edx, 8
sub eax, 0
je 0x511f2f
sub eax, 1
je 0x511f38
sub eax, 1
jne 0x511f38
test edx, edx
je 0x511f38
mov eax, dword [ebp + 0x24]
xchg dword [edx], eax
mov ecx, dword [ebp - 0x7c]
lea eax, [ebp - 0x30]
push eax
call fcn.00516810
mov eax, 2
xchg dword [esi], eax
lea ecx, [ebp - 0x30]
jmp 0x512134
cmp eax, 1
je 0x51223f
cmp eax, 2
je 0x51223f
jmp 0x512216
mov eax, dword [ebp + 0x14]
cmp eax, 0xc0000000
jne 0x51202e
movups xmmword [ebp - 0x40], xmm0
mov dword [ebp - 0x38], 0
movups xmmword [ebp - 0x50], xmm0
mov dword [ebp - 0x34], 0xf
mov byte [ebp - 0x48], 0
lea eax, [ebp - 0x18]
mov byte [ebp - 4], 1
push eax
push 0xc0000000
push dword [edi]
lea ecx, [ebp - 0x50]
mov dword [ebp - 0x18], 0
push 1
call fcn.00515f10
lea eax, [ebp - 0x70]
mov byte [ebp - 4], 0
push eax
lea ecx, [ebp - 0x50]
call fcn.00516860
lea ecx, [ebp - 0x50]
call fcn.005133f0
xor esi, esi
mov edi, dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
xorps xmm0, xmm0
movlpd qword [ebp - 0x1c], xmm0
movlpd qword [ebp - 0x2c], xmm0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x70]
call edi
test eax, eax
je 0x5121a5
lea ecx, [ebp - 0x2c]
call fcn.00516d50
mov edx, dword [ebp - 0x1c]
mov eax, edx
mov ecx, dword [ebp - 0x18]
or eax, ecx
je 0x511ff3
cmp edx, 1
jne 0x5120af
test ecx, ecx
je 0x512292
jmp 0x5120af
cmp eax, 0x80000000
jne 0x512065
push eax
push dword [edi]
movzx eax, byte [0x65fcb8]
lea ecx, [ebp - 0x50]
push eax
movups xmmword [ebp - 0x50], xmm0
movups xmmword [ebp - 0x40], xmm0
call fcn.00512a80
lea eax, [ebp - 0x70]
push eax
lea ecx, [ebp - 0x50]
call fcn.00516860
mov byte [ebp - 0x73], 1
jmp 0x511fc8
xor esi, esi
cmp eax, 0xc0000001
jne 0x511fd2
movzx eax, byte [0x65fcb8]
lea ecx, [ebp - 0x50]
push closesocket
push dword [edi]
movups xmmword [ebp - 0x50], xmm0
push eax
movups xmmword [ebp - 0x40], xmm0
call fcn.00512a80
lea eax, [ebp - 0x70]
push eax
lea ecx, [ebp - 0x50]
call fcn.00516860
lea ecx, [ebp - 0x50]
call fcn.005133f0
mov esi, 1
jmp 0x511fd2
cmp byte [ebp - 0x73], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x44], xmm0
mov dword [ebp - 0x34], 0
je 0x5120ca
mov esi, closesocket
jmp 0x5120d0
add esi, 0xc0000000
push 0xffffffffffffffff
push dword [ebp - 0x78]
lea eax, [ebp - 0x70]
push 0
push 0
push 0
push esi
push eax
lea ecx, [ebp - 0x44]
call fcn.00511210
mov esi, dword [ebp - 0x44]
mov byte [ebp - 4], 0xd
mov eax, dword [esi]
xorps xmm0, xmm0
mov dword [ebp - 0x24], 0
movlpd qword [ebp - 0x2c], xmm0
mov dword [ebp - 0x20], 0
cmp eax, 1
je 0x512110
test eax, eax
jne 0x51211c
lea ecx, [ebp - 0x2c]
call fcn.00516d50
mov eax, dword [esi]
jmp 0x512107
cmp eax, 2
jne 0x5122be
mov ecx, dword [ebp - 0x7c]
lea eax, [ebp - 0x44]
push eax
call fcn.00516810
lea ecx, [ebp - 0x44]
call fcn.005132c0
mov eax, dword [ebp - 0x70]
mov dword [ebp - 4], 0xf
cmp eax, 0xffffffff
je 0x51214f
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x54]
cmp edx, 0x10
jb 0x512187
mov ecx, dword [ebp - 0x68]
inc edx
mov eax, ecx
mov byte [ebp - 4], 0x10
cmp edx, 0x1000
jb 0x51217d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x5122e7
push edx
push ecx
call fcn.006084e7
add esp, 8
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.00608a00
mov esp, ebp
pop ebp
ret 0x20
call sub.KERNEL32.dll_GetLastError
push eax
lea ecx, [ebp - 0x88]
call fcn.00512570
push 0
lea eax, [ebp - 0x88]
push eax
lea ecx, [ebp - 0x198]
call fcn.005125d0
push 0x63bcc4
lea eax, [ebp - 0x198]
push eax
call fcn.00609d27
push 0
push 0x12
lea ecx, [ebp - 0x1c]
call fcn.005125b0
push eax
lea ecx, [ebp - 0xbc]
call fcn.005125d0
push 0x63bcc4
lea eax, [ebp - 0xbc]
push eax
call fcn.00609d27
push 0
push 0
call fcn.00609d27
push 0
push 0
call fcn.00609d27
push 0
push 0x13
lea ecx, [ebp - 0x1c]
call fcn.005125b0
push eax
lea ecx, [ebp - 0xe8]
call fcn.005125d0
push 0x63bcc4
lea eax, [ebp - 0xe8]
push eax
call fcn.00609d27
push 0
push 9
lea ecx, [ebp - 0x1c]
call fcn.005125b0
push eax
lea ecx, [ebp - 0x114]
call fcn.005125d0
push 0x63bcc4
lea eax, [ebp - 0x114]
push eax
call fcn.00609d27
mov dword [ebp - 0x10], esp
lea eax, [ebp - 0x70]
push dword [ebp - 0x18]
mov byte [ebp - 4], 0xb
push 0
push 1
push eax
call fcn.00512330
add esp, 0x10
push 0
push 0
mov dword [ebp - 4], 0xa
call fcn.00609d27
push 0
push 0x13
lea ecx, [ebp - 0x88]
call fcn.005125b0
push eax
lea ecx, [ebp - 0x140]
call fcn.005125d0
push 0x63bcc4
lea eax, [ebp - 0x140]
push eax
call fcn.00609d27
push 0
push 0x13
lea ecx, [ebp - 0x1c]
call fcn.005125b0
push eax
lea ecx, [ebp - 0x16c]
call fcn.005125d0
push 0x63bcc4
lea eax, [ebp - 0x16c]
push eax
call fcn.00609d27
call fcn.00540ccc
int3