Function at 0x51ab80
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5342c4
mov eax, dword fs:[0]
push eax
sub esp, 0x254
mov eax, dword [0x551e00]
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 - 0xf0], 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 - 0xf4], eax
xor al, al
movdqu xmmword [ebp - 0x3c], xmm0
mov dword [ebp - 0x104], edi
movdqu xmmword [ebp - 0x2c], xmm0
mov dword [ebp - 0xfc], ecx
mov byte [ebp - 0xe7], 0
mov byte [ebp - 0xe8], al
mov byte [ebp - 0xea], al
mov byte [ebp - 0xe6], al
mov dword [ebp - 0x3c], 0xffffffff
mov dword [ebp - 0x38], getpeername
mov dword [ebp - 0x20], 0xf
mov dword [ebp - 0x24], 0
mov byte [ebp - 0x34], al
mov eax, dword [ebp + 8]
mov dword [ebp - 4], 0
cmp eax, 1
je 0x51af27
mov esi, dword [ebp + 0x10]
cmp esi, 0xc
jae 0x51ac72
push 0
lea eax, [ebp - 0x100]
mov dword [ebp - 0x100], 0
push eax
lea ecx, [ebp - 0x184]
mov dword [ebp - 0xfc], 0x12
call fcn.0051b660
push 0x549624
lea eax, [ebp - 0x184]
push eax
call fcn.004f9e41
test eax, eax
jne 0x51ac8d
push dword [ebp - 0x18]
lea eax, [ebp - 0x3c]
push ecx
push esi
push edi
push eax
call fcn.0051a770
add esp, 0x14
jmp 0x51adeb
cmp eax, 2
jne 0x51b01b
xor al, al
movlpd qword [ebp - 0x140], xmm0
mov byte [ebp - 0xe5], al
mov dword [ebp - 0x138], 0
mov dword [ebp - 0x134], 0
lea ebx, [ebx]
test al, al
jne 0x51adde
push dword [ebp - 0x18]
lea eax, [ebp - 0x3c]
mov byte [ebp - 4], 4
push ecx
push esi
push edi
push eax
call fcn.0051a770
add esp, 0x14
mov byte [ebp - 0xe7], 1
mov byte [ebp - 0xe5], 1
jmp 0x51adbb
lea ecx, [ebp - 0x140]
mov dword [ebp - 4], 0
call fcn.0051fd60
mov al, byte [ebp - 0xe5]
mov ecx, dword [ebp - 0xfc]
jmp 0x51acc0
cmp byte [ebp - 0xe7], 0
je 0x51b01b
push 0
push esi
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 9
call fcn.0051f7c0
push 0xffffffffffffffff
push dword [ebp - 0xf4]
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x40], 0
push 0
push 0
push 0
push 0xc0000000
xorps xmm0, xmm0
lea ecx, [ebp - 0x50]
push eax
movdqu xmmword [ebp - 0x50], xmm0
call fcn.0051a1b0
mov esi, dword [ebp - 0x50]
mov ecx, 1
mov byte [ebp - 4], 0xa
xor eax, eax
lock cmpxchg dword [esi], ecx
test eax, eax
jne 0x51ae82
mov eax, dword [ebp + 0x20]
sub eax, 0
je 0x51ae4c
dec eax
je 0x51ae59
dec eax
jne 0x51ae59
mov edx, dword [ebp - 0x50]
add edx, 8
je 0x51ae59
mov eax, dword [ebp + 0x24]
xchg dword [edx], eax
mov ecx, dword [ebp - 0xf0]
lea eax, [ebp - 0x50]
push eax
call fcn.0051f590
mov dword [ebp - 4], 0xa
mov eax, 2
xchg dword [esi], eax
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x50]
jmp 0x51b18c
cmp eax, 1
je 0x51aec5
cmp eax, 2
je 0x51aec5
push 0
lea eax, [ebp - 0x108]
mov dword [ebp - 0x108], 0
push eax
lea ecx, [ebp - 0x1dc]
mov dword [ebp - 0x104], 0x13
call fcn.0051b660
push 0x549624
lea eax, [ebp - 0x1dc]
push eax
call fcn.004f9e41
push 0
lea eax, [ebp - 0xf8]
mov dword [ebp - 0xf8], 0
push eax
lea ecx, [ebp - 0x234]
mov dword [ebp - 0xf4], 9
call fcn.0051b660
push 0x549624
lea eax, [ebp - 0x234]
push eax
call fcn.004f9e41
mov dword [ebp - 0x10], esp
lea ecx, [ebp - 0x3c]
push 0
push 1
mov byte [ebp - 4], 0xe
call fcn.0051f7c0
push 0
push 0
mov dword [ebp - 4], 0xd
call fcn.004f9e41
mov eax, 0x51af11
ret
mov eax, dword [ebp + 0x14]
cmp eax, 0xc0000000
jne 0x51af75
push eax
push dword [edi]
movzx eax, byte [0x55b1ad]
lea ecx, [ebp - 0xa4]
push eax
movdqu xmmword [ebp - 0xa4], xmm0
movdqu xmmword [ebp - 0x94], xmm0
call fcn.0051b940
lea eax, [ebp - 0x3c]
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp - 0xa4]
call fcn.0051f5e0
lea ecx, [ebp - 0xa4]
jmp 0x51b012
cmp eax, 0x80000000
jne 0x51afc1
push eax
push dword [edi]
movzx eax, byte [0x55b1ad]
lea ecx, [ebp - 0x84]
push eax
movdqu xmmword [ebp - 0x84], xmm0
movdqu xmmword [ebp - 0x74], xmm0
call fcn.0051b940
lea eax, [ebp - 0x3c]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x84]
call fcn.0051f5e0
mov byte [ebp - 0xe8], 1
lea ecx, [ebp - 0x84]
jmp 0x51b012
cmp eax, 0xc0000001
jne 0x51b01b
movzx eax, byte [0x55b1ad]
lea ecx, [ebp - 0xe4]
push closesocket
push dword [edi]
movdqu xmmword [ebp - 0xe4], xmm0
push eax
movdqu xmmword [ebp - 0xd4], xmm0
call fcn.0051b940
lea eax, [ebp - 0x3c]
mov byte [ebp - 4], 3
push eax
lea ecx, [ebp - 0xe4]
call fcn.0051f5e0
mov byte [ebp - 0xe6], 1
lea ecx, [ebp - 0xe4]
mov byte [ebp - 4], 0
call fcn.0051c070
mov esi, dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
xorps xmm0, xmm0
movlpd qword [ebp - 0x1c], xmm0
movlpd qword [ebp - 0x154], xmm0
mov dword [ebp - 0x14c], 0
mov dword [ebp - 0x148], 0
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x3c]
call esi
test eax, eax
je 0x51b1be
lea ecx, [ebp - 0x154]
call fcn.0051fd60
mov edx, dword [ebp - 0x1c]
mov eax, edx
mov ecx, dword [ebp - 0x18]
or eax, ecx
je 0x51b045
cmp edx, 1
jne 0x51b0aa
test ecx, ecx
jne 0x51b0aa
push ecx
lea eax, [ebp - 0x118]
mov dword [ebp - 0x118], ecx
push eax
lea ecx, [ebp - 0x1b0]
mov dword [ebp - 0x114], 0x13
call fcn.0051b660
push 0x549624
lea eax, [ebp - 0x1b0]
push eax
call fcn.004f9e41
cmp byte [ebp - 0xe8], 0
xorps xmm0, xmm0
movdqu xmmword [ebp - 0x64], xmm0
mov dword [ebp - 0x54], 0
je 0x51b0c9
mov eax, closesocket
jmp 0x51b0d9
xor eax, eax
cmp byte [ebp - 0xe6], al
setne al
add eax, 0xc0000000
push 0xffffffffffffffff
push dword [ebp - 0xf4]
lea ecx, [ebp - 0x64]
push 0
push 0
push 0
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.0051a1b0
mov esi, dword [ebp - 0x64]
mov byte [ebp - 4], 0x10
mov eax, dword [esi]
xorps xmm0, xmm0
mov dword [ebp - 0x128], 0
movlpd qword [ebp - 0x130], xmm0
mov dword [ebp - 0x124], 0
lea esp, [esp]
cmp eax, 1
je 0x51b129
test eax, eax
jne 0x51b138
lea ecx, [ebp - 0x130]
call fcn.0051fd60
mov eax, dword [esi]
jmp 0x51b120
cmp eax, 2
je 0x51b176
push 0
lea eax, [ebp - 0x110]
mov dword [ebp - 0x110], 0
push eax
lea ecx, [ebp - 0x208]
mov dword [ebp - 0x10c], 0x13
call fcn.0051b660
push 0x549624
lea eax, [ebp - 0x208]
push eax
call fcn.004f9e41
mov ecx, dword [ebp - 0xf0]
lea eax, [ebp - 0x64]
push eax
call fcn.0051f590
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x64]
call fcn.0051ebd0
lea ecx, [ebp - 0x3c]
mov dword [ebp - 4], 0xffffffff
call fcn.0051c070
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.004f9e32
mov esp, ebp
pop ebp
ret 0x20
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x120]
call fcn.0051b620
push 0
lea eax, [ebp - 0x120]
push eax
lea ecx, [ebp - 0x260]
call fcn.0051b660
push 0x549624
lea eax, [ebp - 0x260]
push eax
call fcn.004f9e41
int3