Function at 0x4077d8
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x110
mov eax, dword [0x427484]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x42ae78]
push ebx
push esi
push edi
mov edi, ecx
mov dword [edi + 0xec], eax
lea eax, [edi + 0x10]
push 0x443ac8
push eax
mov dword [ebp - 0x10c], edi
lea ebx, [edi + 0xf0]
call fcn.00409fac
test byte [0x429b9c], 1
pop ecx
pop ecx
mov ecx, eax
mov dword [ebp - 0x110], ecx
je 0x40782d
mov eax, dword [ecx]
mov dword [edi + 0x14], eax
xor esi, esi
mov dword [ebp - 0x108], esi
mov eax, dword [0x429b9c]
test dword [esi + 0x42add8], eax
je 0x4078e8
cmp byte [esi + 0x42add4], 0
je 0x407863
mov al, byte [esi + 0x42add0]
mov byte [ebx], al
mov al, byte [esi + 0x42add4]
mov byte [ebx + 1], al
add ebx, 2
mov eax, dword [esi + 0x42add0]
cmp eax, 0x2c
ja 0x4079a1
je 0x407997
dec eax
je 0x40798d
dec eax
dec eax
je 0x407977
sub eax, 3
je 0x407997
dec eax
je 0x407a54
sub eax, 6
je 0x407910
dec eax
dec eax
jne 0x4078d9
cmp byte [0x443bd4], al
je 0x4078d9
mov esi, 0x443bd4
push esi
mov byte [ebx], 0xf
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov byte [ebx + 1], al
movzx eax, al
push eax
lea eax, [ebx + 2]
push esi
push eax
call fcn.00412b70
movzx eax, byte [ebx + 1]
add esp, 0xc
lea ebx, [ebx + eax + 2]
mov esi, dword [ebp - 0x108]
movsx eax, byte [esi + 0x42add4]
mov ecx, dword [ebp - 0x110]
add ebx, eax
add esi, 0xc
mov dword [ebp - 0x108], esi
cmp esi, 0xa8
jb 0x407835
mov ecx, dword [ebp - 4]
mov eax, ebx
sub eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040ffa3
leave
ret
lea eax, [edi + 0x1c]
push eax
push dword [edi + 0x10]
lea esi, [ebp - 0x104]
mov ecx, 0x443ad4
call fcn.00408a77
pop ecx
pop ecx
push 0
push 0x80
push 3
push 0
push 1
push bind
mov eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4078d3
push 0
push esi
mov word [ebx], 0x20d
call dword [sym.imp.KERNEL32.dll_GetFileSize]
shr eax, 9
inc eax
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebx + 2], ax
push esi
add ebx, 4
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4078d3
mov eax, dword [0x443ad0]
cmp eax, 0xffffffff
jne 0x407a56
mov eax, dword [edi + 0x10]
jmp 0x407a56
mov eax, dword [0x443ac8]
jmp 0x407a56
mov eax, dword [0x443acc]
jmp 0x407a56
cmp eax, 0x33
je 0x407a67
cmp eax, 0x35
je 0x407a5d
cmp eax, 0x36
je 0x407a54
cmp eax, 0x39
jbe 0x4078d9
cmp eax, 0x3b
jbe 0x407a3e
cmp eax, 0xfe
je 0x4079eb
cmp eax, 0xff
jne 0x4078d9
mov word [ebx], ax
mov byte [ebx + 2], 0
add ebx, 3
jmp 0x4078d9
xor esi, esi
cmp dword [esi + 0x443c5c], 0
je 0x407a2b
mov al, byte [esi + 0x443c5c]
mov byte [ebx], al
mov eax, dword [ebp - 0x10c]
push dword [eax + 0x10]
lea eax, [esi + 0x443c60]
add edi, 0x1c
push eax
lea ecx, [ebx + 2]
call fcn.004086f7
mov edi, dword [ebp - 0x10c]
mov byte [ebx + 1], al
movzx eax, al
pop ecx
pop ecx
lea ebx, [ebx + eax + 2]
add esi, 0x84
cmp esi, 0x528
jb 0x4079ed
jmp 0x4078d3
mov eax, dword [0x443c54]
cdq
sub eax, edx
sar eax, 1
imul eax, eax, 0x3c
push eax
call dword [sym.imp.WS2_32.dll_htonl]
jmp 0x407a56
mov eax, dword [ecx]
mov dword [ebx], eax
jmp 0x4078d9
mov al, byte [ebp + 8]
mov byte [ebx], al
jmp 0x4078d9
mov eax, dword [0x443c54]
jmp 0x407a48